diff mbox series

Avoid ICE compiling cactusBSSN

Message ID 20190729081756.o6aqhuq2y64jobug@kam.mff.cuni.cz
State New
Headers show
Series Avoid ICE compiling cactusBSSN | expand

Commit Message

Jan Hubicka July 29, 2019, 8:17 a.m. UTC
Hi,
this patch fixes ICE when we output ODR violation warning compiling
cactusBSSN. As indicated in PR, i think the warning is wrong and we need
to teach C++ FE to not consider the type in question as anonymous
namespace.

Regtested x86_64-linux. Comitted as obvious.

	PR lto/91222
	* ipa-devirt.c (warn_types_mismatch): Compare indentifiers
	than INDENTIFIER_POINTER.
diff mbox series

Patch

Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c	(revision 273865)
+++ ipa-devirt.c	(working copy)
@@ -1003,7 +1003,7 @@  warn_types_mismatch (tree t1, tree t2, l
 	n2 = DECL_NAME (n2);
       /* Most of the time, the type names will match, do not be unnecesarily
          verbose.  */
-      if (IDENTIFIER_POINTER (n1) != IDENTIFIER_POINTER (n2))
+      if (n1 != n2)
         inform (loc_t1,
 	        "type %qT defined in anonymous namespace cannot match "
 	        "type %qT across the translation unit boundary",