From 96fc428c75cc0b52a53f6f8231be83dd78dcec4e Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 26 Jul 2006 22:17:32 +0200 Subject: 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 --- gcc/ipa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gcc/ipa.c') 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; -- cgit v1.1