Commit b8ec1bd3 by Jan Hubicka

ipa-devirt.c (odr_types_equivalent_p): Fix formating.

	* ipa-devirt.c (odr_types_equivalent_p): Fix formating.
	(add_type_duplicate): Fix comparison of BINFOs.

From-SVN: r220547
parent 7d8adcba
...@@ -1222,7 +1222,7 @@ add_type_duplicate (odr_type val, tree type) ...@@ -1222,7 +1222,7 @@ add_type_duplicate (odr_type val, tree type)
{ {
bool merge = true; bool merge = true;
bool base_mismatch = false; bool base_mismatch = false;
unsigned int i,j; unsigned int i;
bool warned = false; bool warned = false;
hash_set<type_pair,pair_traits> visited; hash_set<type_pair,pair_traits> visited;
...@@ -1321,10 +1321,12 @@ add_type_duplicate (odr_type val, tree type) ...@@ -1321,10 +1321,12 @@ add_type_duplicate (odr_type val, tree type)
break; break;
} }
} }
#ifdef ENABLE_CHECKING
/* Sanity check that all bases will be build same way again. */ /* Sanity check that all bases will be build same way again. */
if (!base_mismatch && val->bases.length ()) if (!base_mismatch && val->bases.length ())
{ {
unsigned int num_poly_bases = 0; unsigned int num_poly_bases = 0;
unsigned int j;
for (i = 0; i < BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); i++) for (i = 0; i < BINFO_N_BASE_BINFOS (TYPE_BINFO (type)); i++)
if (polymorphic_type_binfo_p (BINFO_BASE_BINFO if (polymorphic_type_binfo_p (BINFO_BASE_BINFO
...@@ -1345,6 +1347,7 @@ add_type_duplicate (odr_type val, tree type) ...@@ -1345,6 +1347,7 @@ add_type_duplicate (odr_type val, tree type)
j++; j++;
} }
} }
#endif
if (base_mismatch) if (base_mismatch)
{ {
merge = false; merge = false;
......
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