From bb8284536c2db028c558bcd4a993d676ac6dc472 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 18 Apr 2018 20:06:07 +0000 Subject: [PATCH] Revert r258133. 2018-04-18 Martin Liska Revert 2018-03-02 Eric Botcazou PR ipa/83983 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both arguments if they are comparable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@259478 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/ipa-devirt.c | 11 +++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ccb00701284..e214a7166e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,15 @@ 2018-04-18 Martin Liska Revert + 2018-03-02 Eric Botcazou + + PR ipa/83983 + * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both + arguments if they are comparable. + +2018-04-18 Martin Liska + + Revert 2018-03-13 Eric Botcazou PR lto/84805 diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index bec0c01ea09..a0c095e1d5d 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; } -- 2.11.4.GIT