https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80513
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- For the first problem this should be sufficient: --- a/libiberty/cplus-dem.c +++ b/libiberty/cplus-dem.c @@ -3173,6 +3173,8 @@ gnu_special (struct work_stuff *work, const char **mangled, string *declp) delta = consume_count (mangled); if (delta == -1) success = 0; + else if (*mangled != '_') + success = 0; else { char *method = internal_cplus_demangle (work, ++*mangled);