https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109480
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=41437 Keywords| |rejects-valid Summary|g++-12 and g++-11 failed to |[11/12/13 Regression] |compile the attached source |non-depedent access goes |file while g++-10 and clang |wrong in a template method |can. |sometimes --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Most likely this was caused by r11-1350 . Reduced further: ``` template <class> struct s { protected: bool g(); void f(); //template <class> friend struct s; }; template <class d> void s<d>::f() { s<int> l; const bool b = l.g(); } ``` This means also s<int>::f would be the only valid specialization here too.