Skip to content

Commit

Permalink
Add regression test for issue #76042
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSeulArtichaut committed Oct 29, 2020
1 parent 1d6a0b0 commit e8bda8d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/ui/issues/issue-76042.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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!();
}
}

0 comments on commit e8bda8d

Please sign in to comment.