re PR tree-optimization/82436 (465.tonto ICE in vect_get_slp_vect_defs, at tree-vect...
authorRichard Biener <rguenther@suse.de>
Wed, 25 Oct 2017 09:59:39 +0000 (09:59 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 25 Oct 2017 09:59:39 +0000 (09:59 +0000)
2017-10-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/82436
* gcc.dg/torture/pr82436-2.c: New testcase.

From-SVN: r254073

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr82436-2.c [new file with mode: 0644]

index 63f9de27945fd9214e994e23c8b7b9105192113e..0e38439e12b84a0a5c0cc3159f58a93edd3beaed 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-25  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/82436
+       * gcc.dg/torture/pr82436-2.c: New testcase.
+
 2017-10-25  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/71820
diff --git a/gcc/testsuite/gcc.dg/torture/pr82436-2.c b/gcc/testsuite/gcc.dg/torture/pr82436-2.c
new file mode 100644 (file)
index 0000000..32eda18
--- /dev/null
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+
+enum
+{
+  a, b, c, d,  e,  f,  g,  h,  j,  k
+};
+
+int l;
+void m (short *s)
+{
+  short n, o, p;
+  float(*q)[k];
+  int r, i;
+  while (l > 0)
+    r = l;
+  for (;;)
+    {
+      i = 0;
+      for (; i < r; i++)
+       {
+           {
+             float ab = q[i][a];
+             int i = ab;
+             p = i;
+           }
+         ((short *) s)[0] = p;
+           {
+             float ab = q[i][b];
+             int i = ab;
+             o = i;
+           }
+         ((short *) s)[1] = o;
+           {
+             float ab = q[i][f];
+             int i = ab;
+             n = i;
+           }
+         ((short *) s)[2] = n;
+         float ab = q[i][g];
+         int i = ab;
+         ((short *) s)[3] = i;
+         s = (short *) s + 4;
+       }
+    }
+}