diff options
author | Jan Hubicka <jh@suse.cz> | 2010-09-19 01:13:17 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-09-18 23:13:17 +0000 |
commit | 9b389a5e64f957b30eb05315b7e15a649a8e1f66 (patch) | |
tree | 863c05e9f2399d3ae354b494076e8a668b4ee323 /gcc/ipa-inline.c | |
parent | 1151446c17ede83ed30b2bfc68137e7573ed0d99 (diff) | |
download | gcc-9b389a5e64f957b30eb05315b7e15a649a8e1f66.zip gcc-9b389a5e64f957b30eb05315b7e15a649a8e1f66.tar.gz gcc-9b389a5e64f957b30eb05315b7e15a649a8e1f66.tar.bz2 |
re PR tree-optimization/45453 (ICE: verify_cgraph_node failed: inlined_to pointer set for noninline callers with -O2 -fno-early-inlining)
PR tree-optimization/45453
* cgraphunit.c (cgraph_finalize_function): Consider comdat & external
virtual functions are reachable.
* ipa-inline.c (cgraph_clone_inlined_nodes): Likewise.
* ipa.c (cgraph_remove_unreachable_nodes): Likewise.
* ipa-prop.c (ipa_modify_formal_parameters): Clear DECL_VIRTUAL_P
when modifying function.
* g++.dg/tree-ssa/pr45453.C: New testcase.
From-SVN: r164405
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 964d03b..21e0b64 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -251,6 +251,12 @@ cgraph_clone_inlined_nodes (struct cgraph_edge *e, bool duplicate, In that case just go ahead and re-use it. */ if (!e->callee->callers->next_caller && cgraph_can_remove_if_no_direct_calls_p (e->callee) + /* Inlining might enable more devirtualizing, so we want to remove + those only after all devirtualizable virtual calls are processed. + Lacking may edges in callgraph we just preserve them post + inlining. */ + && (!DECL_VIRTUAL_P (e->callee->decl) + || (!DECL_COMDAT (e->callee->decl) && !DECL_EXTERNAL (e->callee->decl))) /* Don't reuse if more than one function shares a comdat group. If the other function(s) are needed, we need to emit even this function out of line. */ |