aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-07-26 22:17:32 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2006-07-26 20:17:32 +0000
commit96fc428c75cc0b52a53f6f8231be83dd78dcec4e (patch)
tree067f3bb521f2fed42cb3fd52c2a69fe71a9ac756 /gcc/ipa.c
parent88c4be5e484663d65d6e95c07e49d91dfa36f57e (diff)
downloadgcc-96fc428c75cc0b52a53f6f8231be83dd78dcec4e.zip
gcc-96fc428c75cc0b52a53f6f8231be83dd78dcec4e.tar.gz
gcc-96fc428c75cc0b52a53f6f8231be83dd78dcec4e.tar.bz2
re PR tree-optimization/27882 (segfault in ipa-inline.c, if (e->callee->local.disregard_inline_limits)
PR tree-optimization/27882 * cgraph.c (cgraph_remove_node): Clear needed, reachable, next, previous and decl fields. * cgraphunit.c (cgraph_reset_node): Expect cgraph_remove_node to kill next pointer (cgraph_analyze_compilation_unit): Likewise. * ipa.c (cgraph_remove_unreachable_nodes): Likewise. * ipa-inline.c (cgraph_decide_recursive_inlining): Likewise. (cgraph_early_inlinine): Make order garbage collected. * Makefile.in (gt-ipa-inline): New garbagecollected file. From-SVN: r115763
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 44b0456..b78709b 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -97,7 +97,7 @@ bool
cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
{
struct cgraph_node *first = (void *) 1;
- struct cgraph_node *node;
+ struct cgraph_node *node, *next;
bool changed = false;
int insns = 0;
@@ -151,8 +151,9 @@ cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
unanalyzed nodes so they look like for true extern functions to the rest
of code. Body of such functions is released via remove_node once the
inline clones are eliminated. */
- for (node = cgraph_nodes; node; node = node->next)
+ for (node = cgraph_nodes; node; node = next)
{
+ next = node->next;
if (!node->aux)
{
int local_insns;