Hi!

This bug has been already fixed by Eric in r254188.
Regtested on x86_64-linux -m64/-m32, verified it FAILs with the patch reverted
on both, committed to trunk as obvious.

2017-12-08  Jakub Jelinek  <ja...@redhat.com>

        PR rtl-optimization/81595
        * gcc.c-torture/compile/pr81595.c: New test.

--- gcc/testsuite/gcc.c-torture/compile/pr81595.c.jj    2017-12-08 
20:02:05.823795057 +0100
+++ gcc/testsuite/gcc.c-torture/compile/pr81595.c       2017-12-08 
20:00:05.000000000 +0100
@@ -0,0 +1,39 @@
+/* PR rtl-optimization/81595 */
+
+void
+foo (__INTPTR_TYPE__ *x, int *y, int *z, int u, int v)
+{
+  while (u != 0)
+    {
+      if (*x != 0)
+       {
+         int a = 1;
+ l1:
+         if (*y != 0)
+           {
+             while (a < 2)
+               {
+                 a = 0;
+                 x = (__INTPTR_TYPE__ *)&x;
+ l2:
+                 ++a;
+               }
+             while (*z != 0)
+               ;
+           }
+         a /= 0;
+       }
+      else
+       {
+         *z /= (*z != 0) ? 2 : 0;
+         while (v < 1)
+           {
+             *y = 0;
+             if (v != 0)
+               goto l1;
+             ++v;
+           }
+         goto l2;
+       }
+    }
+}

        Jakub

Reply via email to