]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert r258133.
authorMartin Liska <mliska@suse.cz>
Wed, 18 Apr 2018 20:06:07 +0000 (22:06 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 18 Apr 2018 20:06:07 +0000 (20:06 +0000)
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

gcc/ChangeLog
gcc/ipa-devirt.c

index ccb007012841c0f24589f1ffaa19efa48b1f3aa4..e214a7166e9eed2e0b42a1a8ea51c487e401a9b9 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2018-04-18  Martin Liska  <mliska@suse.cz>
 
        Revert
index bec0c01ea09c7ef727f57e526f815da049110bb2..a0c095e1d5d9def64319b2eb4a23fefc1233062b 100644 (file)
@@ -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;
     }