aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-01-08 19:41:22 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2014-01-08 19:41:22 +0100
commitc6de66659813cd840c2e1f5fe9698ba857618627 (patch)
treeef29961a2249266bdd45d6a2eccdc97a501b9c73
parent4c437f02c24d896b08267b39cd8c8216da3bce4e (diff)
downloadgcc-c6de66659813cd840c2e1f5fe9698ba857618627.zip
gcc-c6de66659813cd840c2e1f5fe9698ba857618627.tar.gz
gcc-c6de66659813cd840c2e1f5fe9698ba857618627.tar.bz2
re PR ipa/59722 (Bootstrap comparison failure on i686-linux)
PR ipa/59722 * ipa-prop.c (ipa_analyze_params_uses): Ignore uses in debug stmts. * gcc.dg/pr59722.c: New test. From-SVN: r206438
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-prop.c7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr59722.c36
4 files changed, 51 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7c1edb5..89aa400 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 786a96f..af2e223 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -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++;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 827b482..4a7b63c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..7626fd2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59722.c
@@ -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);
+}