Skip to content

Commit e8bda8d

Browse files
Add regression test for issue #76042
1 parent 1d6a0b0 commit e8bda8d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/ui/issues/issue-76042.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// run-pass
2+
// compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0
3+
4+
fn foo(a: i128, b: i128, s: u32) -> (i128, i128) {
5+
if s == 128 {
6+
(0, 0)
7+
} else {
8+
(b >> s, a >> s)
9+
}
10+
}
11+
fn main() {
12+
let r = foo(0, 8, 1);
13+
if r.0 != 4 {
14+
panic!();
15+
}
16+
}

0 commit comments

Comments
 (0)