diff options
author | Jan Hubicka <jh@suse.cz> | 2006-07-26 22:17:32 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2006-07-26 20:17:32 +0000 |
commit | 96fc428c75cc0b52a53f6f8231be83dd78dcec4e (patch) | |
tree | 067f3bb521f2fed42cb3fd52c2a69fe71a9ac756 /gcc/ipa.c | |
parent | 88c4be5e484663d65d6e95c07e49d91dfa36f57e (diff) | |
download | gcc-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |