From: hubicka Date: Fri, 19 Sep 2014 02:04:20 +0000 (+0000) Subject: PR lto/63298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69c6bb494db700d564f111bab8f45b1403b1fe6b;p=thirdparty%2Fgcc.git PR lto/63298 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix thinko in a condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215374 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c7b21548572..0330a13997ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-18 Jan Hubicka + + PR lto/63298 + * ipa-devirt.c (odr_subtypes_equivalent_p): Fix thinko in a condition. + 2014-09-18 Joseph Myers * system.h (LIBGCC2_TF_CEXT): Poison. diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 1480b29a89f7..0a11eb72085f 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -525,8 +525,10 @@ odr_subtypes_equivalent_p (tree t1, tree t2, hash_set *vi if (an1 != an2 || an1) return false; - /* For ODR types be sure to compare their names. */ - if ((odr_type_p (t1) && !odr_type_p (t2)) + /* For ODR types be sure to compare their names. + To support -wno-odr-type-merging we allow one type to be non-ODR + and other ODR even though it is a violation. */ + if ((odr_type_p (t1) && odr_type_p (t2)) || (TREE_CODE (t1) == RECORD_TYPE && TREE_CODE (t2) == RECORD_TYPE && TYPE_BINFO (t1) && TYPE_BINFO (t2) && polymorphic_type_binfo_p (TYPE_BINFO (t1))