Commit ab038a80 by Jan Hubicka Committed by Jan Hubicka

* ipa-icf.c (sem_variable::equals_wpa): Check FINAL flags.

From-SVN: r221226
parent 34349d55
2015-03-05 Jan Hubicka <hubicka@ucw.cz>
* ipa-icf.c (sem_variable::equals_wpa): Check FINAL flags.
2015-03-05 Vladimir Makarov <vmakarov@redhat.com>
PR target/64342
......
......@@ -1480,6 +1480,18 @@ sem_variable::equals_wpa (sem_item *item,
ref->referred, ref2->referred,
ref->address_matters_p ()))
return false;
/* DECL_FINAL_P flag on methods referred by virtual tables is used
to decide on completeness possible_polymorphic_call_targets lists
and therefore it must match. */
if ((DECL_VIRTUAL_P (decl) || DECL_VIRTUAL_P (item->decl))
&& (DECL_VIRTUAL_P (ref->referred->decl)
|| DECL_VIRTUAL_P (ref2->referred->decl))
&& ((DECL_VIRTUAL_P (ref->referred->decl)
!= DECL_VIRTUAL_P (ref2->referred->decl))
|| (DECL_FINAL_P (ref->referred->decl)
!= DECL_FINAL_P (ref2->referred->decl))))
return return_false_with_msg ("virtual or final flag mismatch");
}
return true;
......
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