re PR tree-optimization/71854 (ICE at -O3 in both 32-bit and 64-bit modes on x86_64...
authorJakub Jelinek <jakub@redhat.com>
Tue, 17 Jan 2017 15:50:24 +0000 (16:50 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 17 Jan 2017 15:50:24 +0000 (16:50 +0100)
PR tree-optimization/71854
* gcc.dg/vect/pr71854.c: New test.

From-SVN: r244534

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr71854.c [new file with mode: 0644]

index f7d4fa27832de573ba570096dab2d0bc000271bc..e211eb8c3192732a7f59730ab097d638687fdfc5 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/71854
+       * gcc.dg/vect/pr71854.c: New test.
+
 2017-01-17  Martin Liska  <mliska@suse.cz>
 
        PR ipa/71207
diff --git a/gcc/testsuite/gcc.dg/vect/pr71854.c b/gcc/testsuite/gcc.dg/vect/pr71854.c
new file mode 100644 (file)
index 0000000..6dc2c53
--- /dev/null
@@ -0,0 +1,25 @@
+/* PR tree-optimization/71854 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O3 -ftree-loop-if-convert" } */
+
+char a, f = 1;
+int b, c, e[8];
+short d;
+
+short
+foo (short x)
+{
+  return x >= 2 || x >> c ? x : x << c;
+}
+
+int
+main ()
+{
+  while (f)
+    for (d = 0; d <= 7; d++)
+      {
+       f = 7 >> b ? a : a << b;
+       e[d] = foo (f);
+      }
+  return 0;
+}