https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119401
--- Comment #9 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Jason Merrill from comment #8) > (In reply to Patrick Palka from comment #6) > > We could detect if there was an intervening redeclaration by comparing the > > source location of the specialization vs that of the prevailing template > > declaration: > > I thought about that, but am concerned about it failing when we pass > LINE_MAP_MAX_LOCATION_WITH_COLS, which is easier with modules. Of course, > that concern also applies to how enclosing_instantiation_of uses > DECL_SOURCE_LOCATION; perhaps it should use LAMBDA_EXPR_REGEN_INFO instead. Perhaps that's not a risk anymore with 64 bit location_t?