mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
16 lines
297 B
Rust
16 lines
297 B
Rust
// run-pass
|
|
// compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0
|
|
|
|
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!();
|
|
}
|
|
}
|