From: Jakub Jelinek Date: Wed, 8 Jan 2014 18:41:22 +0000 (+0100) Subject: re PR ipa/59722 (Bootstrap comparison failure on i686-linux) X-Git-Tag: releases/gcc-4.9.0~1776 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6de66659813cd840c2e1f5fe9698ba857618627;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c1edb58dea4..89aa4002e3e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-01-08 Jakub Jelinek + + PR ipa/59722 + * ipa-prop.c (ipa_analyze_params_uses): Ignore uses in debug stmts. + 2014-01-08 Bernd Edlinger PR middle-end/57748 diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 786a96f8d334..af2e22392b0b 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 827b482c55ca..4a7b63c30081 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-01-08 Jakub Jelinek + + PR ipa/59722 + * gcc.dg/pr59722.c: New test. + 2014-01-08 Bernd Edlinger 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 000000000000..7626fd22e1d8 --- /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); +}