diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-09-19 04:04:20 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-09-19 02:04:20 +0000 |
commit | 9d8fc086d1482135169d992ca21b33efd651ba4f (patch) | |
tree | 205fd1729fb3f98983739ae53ad2948fcc839ee2 | |
parent | 102ed6c62b186520d5058e2b20199779e707c4f8 (diff) | |
download | gcc-9d8fc086d1482135169d992ca21b33efd651ba4f.zip gcc-9d8fc086d1482135169d992ca21b33efd651ba4f.tar.gz gcc-9d8fc086d1482135169d992ca21b33efd651ba4f.tar.bz2 |
re PR ipa/63298 (internal compiler error: in types_same_for_odr, at ipa-devirt.c:449 with LTO)
PR lto/63298
* ipa-devirt.c (odr_subtypes_equivalent_p): Fix thinko in a condition.
From-SVN: r215374
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-devirt.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c7b215..0330a13 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-18 Jan Hubicka <hubicka@ucw.cz> + + PR lto/63298 + * ipa-devirt.c (odr_subtypes_equivalent_p): Fix thinko in a condition. + 2014-09-18 Joseph Myers <joseph@codesourcery.com> * system.h (LIBGCC2_TF_CEXT): Poison. diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 1480b29..0a11eb7 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<type_pair,pair_traits> *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)) |