mirror of git://gcc.gnu.org/git/gcc.git
* ipa-icf.c (sem_variable::equals_wpa): Check FINAL flags.
From-SVN: r221226
This commit is contained in:
parent
34349d557a
commit
ab038a807d
|
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2015-03-05 Vladimir Makarov <vmakarov@redhat.com>
|
||||||
|
|
||||||
PR target/64342
|
PR target/64342
|
||||||
|
|
|
||||||
|
|
@ -1480,6 +1480,18 @@ sem_variable::equals_wpa (sem_item *item,
|
||||||
ref->referred, ref2->referred,
|
ref->referred, ref2->referred,
|
||||||
ref->address_matters_p ()))
|
ref->address_matters_p ()))
|
||||||
return false;
|
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;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue