re PR c++/91222 (507.cactuBSSN_r build fails in warn_types_mismatch at ipa-devirt...
authorJan Hubicka <hubicka@ucw.cz>
Wed, 2 Oct 2019 12:41:36 +0000 (14:41 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 2 Oct 2019 12:41:36 +0000 (12:41 +0000)
PR c++/91222
* ipa-devirt.c (warn_types_mismatch): Fix conditional on anonymous
namespace types.

From-SVN: r276454

gcc/ChangeLog
gcc/ipa-devirt.c

index f76a6ce676a9764279b079b7f5f006d94fc528a9..49ae8b2cdf2143abe2617024d12b7f3e4f27b889 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-01  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR c++/91222
+       * ipa-devirt.c (warn_types_mismatch): Fix conditional on anonymous
+       namespace types.
+
 2019-10-02  Shahab Vahedi  <shahab@synopsys.com>
 
        * config/arc/arc.h (ASM_SPEC): Pass -mcode-density.
index 3423c4052dbe8dd47869fe7b9294e53cb3a927a5..6c651a3870575165a4e5acce5e936337408b97ef 100644 (file)
@@ -986,8 +986,8 @@ warn_types_mismatch (tree t1, tree t2, location_t loc1, location_t loc2)
       || (type_with_linkage_p (TYPE_MAIN_VARIANT (t2))
          && type_in_anonymous_namespace_p (TYPE_MAIN_VARIANT (t2))))
     {
-      if (type_with_linkage_p (TYPE_MAIN_VARIANT (t1))
-         && !type_in_anonymous_namespace_p (TYPE_MAIN_VARIANT (t1)))
+      if (!type_with_linkage_p (TYPE_MAIN_VARIANT (t1))
+         || !type_in_anonymous_namespace_p (TYPE_MAIN_VARIANT (t1)))
        {
          std::swap (t1, t2);
          std::swap (loc_t1, loc_t2);