Hi,
I forgot the following change in my tree. It fixes type consistency sanity
check in get_polymorphic_call_info. With the change to gimple-fold it is
now needed to devrirtualize devirt2.C. (previously the bug went latent since
the old code handled the testcase)
I am re-testing x86_64-linux and will commit it shortly. I apologize for
breaking the testcase.
Honza
* ipa-devirt.c (get_polymorphic_call_info): Fix offset when
checking type consistency; do not set bogus outer_type
when check fails.
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c (revision 206040)
+++ ipa-devirt.c (working copy)
@@ -982,23 +982,22 @@ get_polymorphic_call_info (tree fndecl,
is known. */
else if (DECL_P (base))
{
- context->outer_type = TREE_TYPE (base);
gcc_assert (!POINTER_TYPE_P (context->outer_type));
/* Only type inconsistent programs can have otr_type that is
not part of outer type. */
- if (!contains_type_p (context->outer_type,
- context->offset, *otr_type))
+ if (!contains_type_p (TREE_TYPE (base),
+ context->offset + offset2, *otr_type))
return base_pointer;
+ context->outer_type = TREE_TYPE (base);
context->offset += offset2;
- base_pointer = NULL;
/* Make very conservative assumption that all objects
may be in construction.
TODO: ipa-prop already contains code to tell better.
merge it later. */
context->maybe_in_construction = true;
context->maybe_derived_type = false;
- return base_pointer;
+ return NULL;
}
else
break;