aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-01-11 11:17:12 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-01-11 11:17:12 +0100
commit6ebf16e63f00d96e5740ac4de9f5251d9cb2f50e (patch)
tree68e86492c0ece6739cdb0cfdf5af6309c227946b /gcc
parenta8766179a75fd18a1636b80425f81c0cd54d6151 (diff)
downloadgcc-6ebf16e63f00d96e5740ac4de9f5251d9cb2f50e.zip
gcc-6ebf16e63f00d96e5740ac4de9f5251d9cb2f50e.tar.gz
gcc-6ebf16e63f00d96e5740ac4de9f5251d9cb2f50e.tar.bz2
re PR rtl-optimization/88296 (Infinite loop in lra_split_hard_reg_for)
PR rtl-optimization/88296 * gcc.target/i386/pr88296.c: New test. From-SVN: r267831
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr88296.c66
2 files changed, 71 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 11eddf7..beccccd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/88296
+ * gcc.target/i386/pr88296.c: New test.
+
2019-01-11 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/diagnostic/extern-initialized.C: New.
diff --git a/gcc/testsuite/gcc.target/i386/pr88296.c b/gcc/testsuite/gcc.target/i386/pr88296.c
new file mode 100644
index 0000000..d1e7f21
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr88296.c
@@ -0,0 +1,66 @@
+/* PR rtl-optimization/88296 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O2 -march=core2 -fnon-call-exceptions -fschedule-insns -fselective-scheduling -funroll-all-loops -fno-caller-saves -fno-guess-branch-probability -fno-ivopts -fno-rerun-cse-after-loop -fno-split-wide-types -fno-tree-bit-ccp -fno-tree-coalesce-vars --param max-completely-peeled-insns=13" } */
+
+int a, b, c;
+void bar (int, int);
+
+void
+foo (__int128 x, unsigned int y, char z)
+{
+ __int128 *d = &x;
+ unsigned short int e = 0;
+ unsigned char f = 0;
+ char g = 1;
+ (void) d;
+ bar (0, 0);
+ while (e < 1)
+ {
+ __int128 h = 1;
+ ++c;
+ e = x;
+ g /= e;
+ if (g != 0)
+ {
+ int i;
+ if (g == 0)
+ i = a;
+ else
+ {
+ ++g;
+ i = g;
+ }
+ if (i == 0)
+ {
+ a -= b + (!!g ? y : 0);
+ break;
+ }
+ for (g = 0; g < 3; ++g)
+ {
+ unsigned char *j = &f;
+ x /= h;
+ h /= x;
+ for (i = 0; i < 2; ++i)
+ {
+ z <<= ((!!g && !!c) ? (b + 1) : (1 / *j));
+ y = ~e;
+ g &= y;
+ x |= 1;
+ b *= i;
+ ++c;
+ }
+ f /= b > 1;
+ e /= f;
+ x += b << 32; /* { dg-warning "left shift count" } */
+ }
+ if (g << g == 0)
+ {
+ e *= b + 1;
+ a = 32;
+ f += (e << a) + (y && 1);
+ x = z;
+ c += x / 3;
+ }
+ }
+ }
+}