diff mbox series

Fix another -Wodr ICE

Message ID 20191002124557.hdj7g6laygt7fx6p@kam.mff.cuni.cz
State New
Headers show
Series Fix another -Wodr ICE | expand

Commit Message

Jan Hubicka Oct. 2, 2019, 12:45 p.m. UTC
Hi,
this patch finally makes cactusBSSN working.  The logic which was
supposed to get anonymous namespace type first (if it exists) was
wrong as was caught by a subsetquent assert.

Bootstrapped/regtested x86_64-linux, comitted.
Honza
diff mbox series

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 276453)
+++ ChangeLog	(working copy)
@@ -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: ipa-devirt.c
===================================================================
--- ipa-devirt.c	(revision 276441)
+++ ipa-devirt.c	(working copy)
@@ -986,8 +986,8 @@  warn_types_mismatch (tree t1, tree t2, l
       || (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);