From 33c3b6be4d07de8f633a58b48d2e602586c1ad07 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 18 Jan 2015 18:31:35 +0100 Subject: re PR ipa/64378 (ICE: in inline_call, at ipa-inline-transform.c:347 with -O3 -fno-ipa-cp) PR ipa/64378 * ipa-prop.c (try_make_edge_direct_virtual_call): Clear speculative flag correctly. * ipa-cp.c (ipa_get_indirect_edge_target_1): Handle speculation. * g++.dg/torture/pr64378.C: New testcase. From-SVN: r219822 --- gcc/ipa-prop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ipa-prop.c') diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 6807c22..9c8a785 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2985,7 +2985,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie, || !possible_polymorphic_call_target_p (ie, cgraph_node::get (t))) { - /* Do not speculate builtin_unreachable, it is stpid! */ + /* Do not speculate builtin_unreachable, it is stupid! */ if (!ie->indirect_info->vptr_changed) target = ipa_impossible_devirt_target (ie, target); } @@ -3013,6 +3013,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie, ctx, &final); if (final && targets.length () <= 1) { + speculative = false; if (targets.length () == 1) target = targets[0]->decl; else -- cgit v1.1