aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-polymorphic-call.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-10-04 05:24:42 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-10-04 03:24:42 +0000
commit07f4a83d4afba28f8b73a9b9a8aeb48adec9eac3 (patch)
tree4e12538abcb7a57877879348dae3ea4837723aa8 /gcc/ipa-polymorphic-call.c
parentdbaba85539c4742ccb02f4750c05ccc296cbbb7b (diff)
downloadgcc-07f4a83d4afba28f8b73a9b9a8aeb48adec9eac3.zip
gcc-07f4a83d4afba28f8b73a9b9a8aeb48adec9eac3.tar.gz
gcc-07f4a83d4afba28f8b73a9b9a8aeb48adec9eac3.tar.bz2
devirt-42.C: New testcase.
* testsuite/g++.dg/ipa/devirt-42.C: New testcase. * testsuite/g++.dg/ipa/devirt-43.C: New testcase. * testsuite/g++.dg/ipa/devirt-44.C: New testcase. * testsuite/g++.dg/ipa/devirt-45.C: New testcase. * ipa-polymorphic-call.c (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Fix code determining speculative type. (ipa_polymorphic_call_context::combine_with): Fix speculation merge. From-SVN: r215886
Diffstat (limited to 'gcc/ipa-polymorphic-call.c')
-rw-r--r--gcc/ipa-polymorphic-call.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ipa-polymorphic-call.c b/gcc/ipa-polymorphic-call.c
index f352625..a9b037a 100644
--- a/gcc/ipa-polymorphic-call.c
+++ b/gcc/ipa-polymorphic-call.c
@@ -820,8 +820,7 @@ ipa_polymorphic_call_context::ipa_polymorphic_call_context (tree fndecl,
&offset2, &size, &max_size);
if (max_size != -1 && max_size == size)
- combine_speculation_with (TYPE_MAIN_VARIANT
- (TREE_TYPE (TREE_TYPE (base_pointer))),
+ combine_speculation_with (TYPE_MAIN_VARIANT (TREE_TYPE (base)),
offset + offset2,
true,
NULL /* Do not change outer type. */);
@@ -1970,7 +1969,7 @@ ipa_polymorphic_call_context::combine_with (ipa_polymorphic_call_context ctx,
updated |= combine_speculation_with (ctx.speculative_outer_type,
ctx.speculative_offset,
- ctx.maybe_in_construction,
+ ctx.speculative_maybe_derived_type,
otr_type);
if (updated && dump_file && (dump_flags & TDF_DETAILS))