aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2013-01-17 12:43:14 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2013-01-17 12:43:14 +0100
commit8222c37ededfe0f55233898ecc7c4cc023f6389c (patch)
tree6eb8a1715d592561febe771539bf683003e002a1 /gcc/ipa.c
parentc5e7e996fba2a45b4b36e8831c1d9dd4382d3b34 (diff)
downloadgcc-8222c37ededfe0f55233898ecc7c4cc023f6389c.zip
gcc-8222c37ededfe0f55233898ecc7c4cc023f6389c.tar.gz
gcc-8222c37ededfe0f55233898ecc7c4cc023f6389c.tar.bz2
re PR tree-optimization/55264 (ICE: in ipa_make_edge_direct_to_target, at ipa-prop.c:2141 with -O2 -fno-early-inlining -fno-weak)
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. From-SVN: r195262
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index f87e03b..a9b8fb4 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -241,8 +241,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
&& (!cgraph_can_remove_if_no_direct_calls_and_refs_p (node)
/* Keep around virtual functions for possible devirtualization. */
|| (before_inlining_p
- && DECL_VIRTUAL_P (node->symbol.decl)
- && (DECL_COMDAT (node->symbol.decl) || DECL_EXTERNAL (node->symbol.decl)))))
+ && DECL_VIRTUAL_P (node->symbol.decl))))
{
gcc_assert (!node->global.inlined_to);
pointer_set_insert (reachable, node);