diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-17 11:43:14 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-17 11:43:14 +0000 |
commit | 3f442959db155a0ef27112734f7183aacbdec95d (patch) | |
tree | 6eb8a1715d592561febe771539bf683003e002a1 /gcc/ipa-inline-transform.c | |
parent | 2f1821439fa891e0334f588af97aa5d40bdc8f07 (diff) | |
download | gcc-3f442959db155a0ef27112734f7183aacbdec95d.tar.gz |
2013-01-17 Martin Jambor <mjambor@suse.cz>
PR tree-optimizations/55264
* ipa-inline-transform.c (can_remove_node_now_p_1): Never return true
for virtual methods.
* ipa.c (symtab_remove_unreachable_nodes): Never return true for
virtual methods before inlining is over.
* cgraph.h (cgraph_only_called_directly_or_aliased_p): Return false for
virtual functions.
* cgraphclones.c (cgraph_create_virtual_clone): Mark clones as
non-virtual.
testsuite/
* g++.dg/ipa/pr55264.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195262 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r-- | gcc/ipa-inline-transform.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c index 0fb8940b82b..cac20fecc3b 100644 --- a/gcc/ipa-inline-transform.c +++ b/gcc/ipa-inline-transform.c @@ -92,9 +92,7 @@ can_remove_node_now_p_1 (struct cgraph_node *node) those only after all devirtualizable virtual calls are processed. Lacking may edges in callgraph we just preserve them post inlining. */ - && (!DECL_VIRTUAL_P (node->symbol.decl) - || (!DECL_COMDAT (node->symbol.decl) - && !DECL_EXTERNAL (node->symbol.decl))) + && !DECL_VIRTUAL_P (node->symbol.decl) /* During early inlining some unanalyzed cgraph nodes might be in the callgraph and they might reffer the function in question. */ && !cgraph_new_nodes); |