diff options
author | Martin Liska <mliska@suse.cz> | 2018-04-18 22:06:07 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-04-18 20:06:07 +0000 |
commit | 3c674e3e41e8b983161b3af788f1ab09e163808d (patch) | |
tree | b306466df9ac2f7d36b7dd7a33b3e8e9c7d15a8e /gcc/ipa-devirt.c | |
parent | 5722ce75437dd48d2cbaf8ad8cc12f6c4e7dfaba (diff) | |
download | gcc-3c674e3e41e8b983161b3af788f1ab09e163808d.zip gcc-3c674e3e41e8b983161b3af788f1ab09e163808d.tar.gz gcc-3c674e3e41e8b983161b3af788f1ab09e163808d.tar.bz2 |
Revert r258133.
2018-04-18 Martin Liska <mliska@suse.cz>
Revert
2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
PR ipa/83983
* ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
arguments if they are comparable.
From-SVN: r259478
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index bec0c01..a0c095e 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -684,14 +684,9 @@ odr_subtypes_equivalent_p (tree t1, tree t2, { if (!types_same_for_odr (t1, t2, true)) return false; - /* Limit recursion: if subtypes are ODR types and we know that they are - same, be happy. We need to call get_odr_type on both subtypes since - we don't know which among t1 and t2 defines the common ODR type and - therefore which call will report the ODR violation, if any. */ - if (!odr_type_p (t1) - || !odr_type_p (t2) - || (!get_odr_type (t1, true)->odr_violated - && !get_odr_type (t2, true)->odr_violated)) + /* Limit recursion: If subtypes are ODR types and we know + that they are same, be happy. */ + if (!odr_type_p (t1) || !get_odr_type (t1, true)->odr_violated) return true; } |