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. 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",