https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89001
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- start_mangling (variable); write_string ("_ZGR"); check_abi_tags (variable); write_name (variable, /*ignore_local_scope=*/0); /* Avoid name clashes with aggregate initialization of multiple references at once. */ write_unsigned_number (temp_count++); return finish_mangling_get_identifier (); So, the number we append is unique to the whole TU, rather than specific to a particular lifetime-extended temporary. So, we'd need to do more than just change that write_unsigned_number call to write_compact_number.