From: hubicka Date: Wed, 2 Oct 2019 12:41:36 +0000 (+0000) Subject: PR c++/91222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e384dcf2eede5ba39d9f4a5dd8832f7a1ba1416;p=thirdparty%2Fgcc.git PR c++/91222 * ipa-devirt.c (warn_types_mismatch): Fix conditional on anonymous namespace types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276454 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f76a6ce676a9..49ae8b2cdf21 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-01 Jan Hubicka + + PR c++/91222 + * ipa-devirt.c (warn_types_mismatch): Fix conditional on anonymous + namespace types. + 2019-10-02 Shahab Vahedi * config/arc/arc.h (ASM_SPEC): Pass -mcode-density. diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 3423c4052dbe..6c651a387057 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -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);