From: Richard Guenther Date: Wed, 23 Jan 2008 14:20:07 +0000 (+0000) Subject: re PR middle-end/31529 (ICE in cgraph_expand_function with IMA) X-Git-Tag: releases/gcc-4.3.0~455 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b86b3ea354db58a3cc83b396a093c4e498eb8f95;p=thirdparty%2Fgcc.git re PR middle-end/31529 (ICE in cgraph_expand_function with IMA) 2008-01-23 Richard Guenther PR middle-end/31529 * cgraphunit.c (cgraph_reset_node): Always mark the node not reachable if it is not queued already. * gcc.dg/pr31529-1.c: New testcase. * gcc.dg/pr31529-2.c: Likewise. From-SVN: r131758 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44e291e5e66a..e9038f7ff9fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-01-23 Richard Guenther + + PR middle-end/31529 + * cgraphunit.c (cgraph_reset_node): Always mark the node + not reachable if it is not queued already. + 2008-01-23 Bernd Schmidt * config/bfin/bfin-protos.h (WA_RETS, ENABLE_WA_RETS): New macros. diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 5d81f5682d6c..07b597f7bca6 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -574,8 +574,9 @@ cgraph_reset_node (struct cgraph_node *node) cgraph_node_remove_callees (node); /* We may need to re-queue the node for assembling in case - we already proceeded it and ignored as not needed. */ - if (node->reachable && !flag_unit_at_a_time) + we already proceeded it and ignored as not needed or got + a re-declaration in IMA mode. */ + if (node->reachable) { struct cgraph_node *n; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 743125e76062..2608146190fb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-01-23 Richard Guenther + + PR middle-end/31529 + * gcc.dg/pr31529-1.c: New testcase. + * gcc.dg/pr31529-2.c: Likewise. + 2008-01-23 Jakub Jelinek PR c++/34829 diff --git a/gcc/testsuite/gcc.dg/pr31529-1.c b/gcc/testsuite/gcc.dg/pr31529-1.c new file mode 100644 index 000000000000..20703ed25380 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr31529-1.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-combine" } */ +/* { dg-additional-sources "pr31529-2.c" } */ + +getline () +{ +} diff --git a/gcc/testsuite/gcc.dg/pr31529-2.c b/gcc/testsuite/gcc.dg/pr31529-2.c new file mode 100644 index 000000000000..40d8ef86830e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr31529-2.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ + +extern __inline +getline () +{ +}