https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64882

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
FYI, testcase tweaked to be 32-bit clean and still exhibit the issue with -m64:
--- gcc/testsuite/gcc.dg/pr64882.c.jj    2015-01-31 11:40:35.492612235 +0100
+++ gcc/testsuite/gcc.dg/pr64882.c    2015-01-31 11:40:20.000000000 +0100
@@ -0,0 +1,34 @@
+/* PR rtl-optimization/64882 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -g" } */
+
+int a, d, e;
+long long b;
+static long long *c = &b;
+
+void
+fn1 (short p)
+{
+}
+
+long long
+fn2 (long long p1, long long p2)
+{
+  return (p1 && p1 > 26854775807LL - p2) || p1 < -p2 ? p1 : p1 + p2;
+}
+
+void
+fn3 ()
+{
+  long long f;
+  int g = 3;
+  int *h = &a;
+  for (e = 0; e < 2; e++)
+    {
+      int *i = &g;
+      if (!fn2 (*c, 7 < d % (*i)--))
+    f = fn2 ((*h <= 0) | b, 5278350700LL);
+      *h = f;
+      fn1 (*h);
+    }
+}

Reply via email to