aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@gcc.gnu.org>2017-08-09 23:52:30 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2017-08-09 23:52:30 +0200
commit25f402d1c15ba155b019ac99cf99496822f54a60 (patch)
tree71d31e10e03eece6b8e92a6b637b6979e1d66dae /gcc
parent12c2ab7bb4afa162e0c47ec2bef1b82fd5e38c7d (diff)
downloadgcc-25f402d1c15ba155b019ac99cf99496822f54a60.zip
gcc-25f402d1c15ba155b019ac99cf99496822f54a60.tar.gz
gcc-25f402d1c15ba155b019ac99cf99496822f54a60.tar.bz2
This time with the file added.
Testcase for PR81423 gcc/testsuite/ PR rtl-optimization/81423 * gcc.c-torture/execute/pr81423.c: New testcase. From-SVN: r251011
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr81423.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr81423.c b/gcc/testsuite/gcc.c-torture/execute/pr81423.c
new file mode 100644
index 0000000..731aa8f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr81423.c
@@ -0,0 +1,36 @@
+extern void abort (void);
+
+unsigned long long int ll = 0;
+unsigned long long int ull1 = 1ULL;
+unsigned long long int ull2 = 12008284144813806346ULL;
+unsigned long long int ull3;
+
+unsigned long long int __attribute__ ((noinline))
+foo (void)
+{
+ ll = -5597998501375493990LL;
+
+ ll = (5677365550390624949L - ll) - (ull1 > 0);
+ unsigned long long int ull3;
+ ull3 = (unsigned int)
+ (2067854353L <<
+ (((ll + -2129105131L) ^ 10280750144413668236ULL) -
+ 10280750143997242009ULL)) >> ((2873442921854271231ULL | ull2)
+ - 12098357307243495419ULL);
+
+ return ull3;
+}
+
+int
+main (void)
+{
+ /* We need a long long of exactly 64 bits for this test. */
+ ll--;
+ if (ll != 0xffffffffffffffffULL)
+ return 0;
+
+ ull3 = foo ();
+ if (ull3 != 3998784)
+ abort ();
+ return 0;
+}