https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121676
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |rejects-valid Last reconfirmed| |2025-08-26 Ever confirmed|0 |1 Blocks|65608 | --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. It is not just friend but also typedef: ``` typedef struct { } A; template <int> struct B { template<int> struct C { }; }; template <int v> struct f{ typedef struct B<v>::template C<0> C2; }; ``` Looks like because B<v> is dependent which is causing the issue. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65608 [Bug 65608] [meta-bug] friend issues