summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeSeulArtichaut <leseulartichaut@gmail.com>2020-09-24 17:25:48 +0200
committerLeSeulArtichaut <leseulartichaut@gmail.com>2020-10-29 13:21:59 +0100
commite8bda8defce426bae9caad1af7defebf88a24169 (patch)
treef0dff855d54a66f1d46bf9a3efd6eba6c11b5041
parentAuto merge of #78486 - pietroalbini:manifest-artifacts, r=Mark-Simulacrum (diff)
downloadrust-LeSeulArtichaut-patch-1.tar.gz
rust-LeSeulArtichaut-patch-1.tar.bz2
rust-LeSeulArtichaut-patch-1.tar.xz
Add regression test for issue #76042LeSeulArtichaut-patch-1
-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 0000000..34d5293
--- /dev/null
+++ b/src/test/ui/issues/issue-76042.rs
@@ -0,0 +1,16 @@
1// run-pass
2// compile-flags: -Coverflow-checks=off -Ccodegen-units=1 -Copt-level=0
3
4fn 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}
11fn main() {
12 let r = foo(0, 8, 1);
13 if r.0 != 4 {
14 panic!();
15 }
16}