https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107906
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ABI Last reconfirmed| |2022-11-29 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- With namespace { class Y {}; } template<class X> struct Z { Z() {} }; Z<Y> z; 'z' is local and the CTOR is as well. So it's somehow a mistake of function templates.