https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120287
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> --- Should this be two separate bugs? There might be one that's been there since gcc-5 but there's still a newer one that's is a gcc-15 regression. It's only ice-on-invalid-code though, so I guess it's not too important.