https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120287
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I guess it depends on what approach is used to fix this. If just handling error_mark_node gracefully during the mangling (emit something in that case, what exactly doesn't matter much) and/or somehow figure out that the to be mangled entity (whether variable template or function template etc.) is somehow erroneous and don't try to mangle it at all. If the former, then it is the same bug...