2025-07-13 16:56:31 -04:00
|
|
|
// https://github.com/rust-lang/rust/issues/76042
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ run-pass
|
|
|
|
|
//@ compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0
|
2020-09-24 17:25:48 +02:00
|
|
|
|
|
|
|
|
fn foo(a: i128, b: i128, s: u32) -> (i128, i128) {
|
|
|
|
|
if s == 128 {
|
|
|
|
|
(0, 0)
|
|
|
|
|
} else {
|
|
|
|
|
(b >> s, a >> s)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
fn main() {
|
|
|
|
|
let r = foo(0, 8, 1);
|
|
|
|
|
if r.0 != 4 {
|
|
|
|
|
panic!();
|
|
|
|
|
}
|
|
|
|
|
}
|