Commit 7656ee72 by Jan Hubicka Committed by Jan Hubicka

ipa-devirt.c (get_polymorphic_call_info): Fix offset calculatoin in contains_type_p query.


	* ipa-devirt.c (get_polymorphic_call_info): Fix offset calculatoin
	in contains_type_p query.

From-SVN: r206061
parent 18aacdca
2013-12-17 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (get_polymorphic_call_info): Fix offset calculatoin
in contains_type_p query.
2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
* omp-low.c (tmp_ompfn_id_num): Remove leftover variable
......@@ -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));
gcc_assert (!POINTER_TYPE_P (TREE_TYPE (base)));
/* 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment