]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/69542 (-fcompare-debug failure in simplify-rtx.c on i?86 since r232905)
authorJakub Jelinek <jakub@redhat.com>
Thu, 28 Jan 2016 21:01:51 +0000 (22:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 28 Jan 2016 21:01:51 +0000 (22:01 +0100)
PR middle-end/69542
* lra-remat.c (calculate_local_reg_remat_bb_data): Only consider
non-debug insns.

* gcc.dg/torture/pr69542.c: New test.

From-SVN: r232946

gcc/ChangeLog
gcc/lra-remat.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr69542.c [new file with mode: 0644]

index c2df5a036fcf984d5187946becf6c38d8dc3f810..4df81d56a199f38e22e25db0e9f99c43f412fa2f 100644 (file)
@@ -1,3 +1,9 @@
+2016-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/69542
+       * lra-remat.c (calculate_local_reg_remat_bb_data): Only consider
+       non-debug insns.
+
 2016-01-28  Pat Haugen  <pthaugen@us.ibm.com>
 
        * config/rs6000/rs6000.c (output_cbranch): Don't statically predict
index 4d8099fcd8e1a6ca6d8643c195c12bc3583ead43..e729ea93298fb8b6d722c780c936ab47f7f4e395 100644 (file)
@@ -694,7 +694,7 @@ calculate_local_reg_remat_bb_data (void)
 
   FOR_EACH_BB_FN (bb, cfun)
     FOR_BB_INSNS (bb, insn)
-      if (INSN_P (insn))
+      if (NONDEBUG_INSN_P (insn))
        set_bb_regs (bb, insn);
 }
 
index 6e5e218815361ed31dc90a2d8abd8bb6f653d9d0..a378dd62ca4b389055287f3db088b7636efe1845 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-28  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/69542
+       * gcc.dg/torture/pr69542.c: New test.
+
 2016-01-28  Wilco Dijkstra  <wdijkstr@arm.com>
 
        * gcc.target/aarch64/ccmp_1.c: Fix test issue.
diff --git a/gcc/testsuite/gcc.dg/torture/pr69542.c b/gcc/testsuite/gcc.dg/torture/pr69542.c
new file mode 100644 (file)
index 0000000..ced5c32
--- /dev/null
@@ -0,0 +1,37 @@
+/* PR middle-end/69542 */
+/* { dg-do compile } */
+/* { dg-additional-options "-fcompare-debug" } */
+
+typedef struct A *B;
+extern int *a[];
+struct C { B b; struct D *d; };
+struct A { struct { struct C e[1]; long long f[1]; } u; };
+struct D { int g; B h[100]; };
+int b, c, e, g;
+B d, f;
+void foo (void) __attribute__ ((__noreturn__));
+int bar (void)
+{
+  int i = 0;
+  do
+    {
+      if ('E' && a[e][0] != 'V')
+        foo ();
+      struct D *k = d->u.e[0].d;
+      B x = k->h[i], o = f->u.e[0].b;
+      if (b)
+        return 0;
+      if (a[g][0] != 'E' && a[g][0] != 'V')
+        foo ();
+      struct D *n = o->u.e[0].d;
+      int r = x->u.f[0];
+      (void) r;
+      if (c)
+        foo ();
+      B y = n->h[x->u.f[0]];
+      if (i != y->u.f[0])
+        return 0;
+      i++;
+    }
+  while (1);
+}