https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77739
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Or another option perhaps would be in cp_genericize_data note whether it is cp_genericize_tree called from cp_genericize or from elsewhere, and only replace invisiref parms if called from cp_genericize.