re PR ipa/59722 (Bootstrap comparison failure on i686-linux)
authorJakub Jelinek <jakub@redhat.com>
Wed, 8 Jan 2014 18:41:22 +0000 (19:41 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 8 Jan 2014 18:41:22 +0000 (19:41 +0100)
PR ipa/59722
* ipa-prop.c (ipa_analyze_params_uses): Ignore uses in debug stmts.

* gcc.dg/pr59722.c: New test.

From-SVN: r206438

gcc/ChangeLog
gcc/ipa-prop.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr59722.c [new file with mode: 0644]

index 7c1edb5..89aa400 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-08  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/59722
+       * ipa-prop.c (ipa_analyze_params_uses): Ignore uses in debug stmts.
+
 2014-01-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        PR middle-end/57748
index 786a96f..af2e223 100644 (file)
@@ -2127,8 +2127,11 @@ ipa_analyze_params_uses (struct cgraph_node *node,
              FOR_EACH_IMM_USE_FAST (use_p, imm_iter, ddef)
                if (!is_gimple_call (USE_STMT (use_p)))
                  {
-                   controlled_uses = IPA_UNDESCRIBED_USE;
-                   break;
+                   if (!is_gimple_debug (USE_STMT (use_p)))
+                     {
+                       controlled_uses = IPA_UNDESCRIBED_USE;
+                       break;
+                     }
                  }
                else
                  controlled_uses++;
index 827b482..4a7b63c 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-08  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/59722
+       * gcc.dg/pr59722.c: New test.
+
 2014-01-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        PR middle-end/57748
diff --git a/gcc/testsuite/gcc.dg/pr59722.c b/gcc/testsuite/gcc.dg/pr59722.c
new file mode 100644 (file)
index 0000000..7626fd2
--- /dev/null
@@ -0,0 +1,36 @@
+/* PR ipa/59722 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+extern void abrt (const char *, int) __attribute__((noreturn));
+void baz (int *, int *);
+
+static inline int
+bar (void)
+{
+  return 1;
+}
+
+static inline void
+foo (int *x, int y (void))
+{
+  while (1)
+    {
+      int a = 0;
+      if (*x)
+       {
+         baz (x, &a);
+         while (a && !y ())
+           ;
+         break;
+       }
+      abrt ("", 1);
+    }
+}
+
+void
+test (int x)
+{
+  foo (&x, bar);
+  foo (&x, bar);
+}