From fff4a6c8d21c1da1775b2de3608754eff478f360 Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 24 Sep 2014 20:30:21 +0000 Subject: * ipa-utils.h (polymorphic_call_context): Add metdhos dump, debug and clear_outer_type. (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Simplify. (ipa_polymorphic_call_context::clear_outer_type): New method. * ipa-prop.c (ipa_analyze_call_uses): Do not overwrite offset. * ipa-devirt.c (types_odr_comparable): New function. (types_must_be_same_for_odr): New function. (odr_subtypes_equivalent_p): Simplify. (possible_placement_new): Break out from ... (ipa_polymorphic_call_context::restrict_to_inner_type): ... here; be more cuatious about returning false in cases the context may be valid in derived type or via placement new. (contains_type_p): Clear maybe_derived_type (ipa_polymorphic_call_context::dump): New method. (ipa_polymorphic_call_context::debug): New method. (ipa_polymorphic_call_context::set_by_decl): Cleanup comment. (ipa_polymorphic_call_context::set_by_invariant): Simplify. (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Simplify. (possible_polymorphic_call_targets): Trust context.restrict_to_inner_class to suceed on all valid cases; remove confused sanity check. (dump_possible_polymorphic_call_targets): Simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215569 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 9c7aaf7b899..b65a1e21493 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2357,7 +2357,8 @@ ipa_analyze_call_uses (struct func_body_info *fbi, gimple call) if (context.get_dynamic_type (instance, OBJ_TYPE_REF_OBJECT (target), - otr_type, call)) + otr_type, call) + && context.offset == cs->indirect_info->offset) { gcc_assert (TREE_CODE (otr_type) == RECORD_TYPE); cs->indirect_info->polymorphic = true; -- cgit v1.2.1