summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-76042.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-76042.rs')
-rw-r--r--src/test/ui/issues/issue-76042.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-76042.rs b/src/test/ui/issues/issue-76042.rs
new file mode 100644
index 000000000..34d529379
--- /dev/null
+++ b/src/test/ui/issues/issue-76042.rs
@@ -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!();
+ }
+}