https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103927
Bug ID: 103927 Summary: ICE in a recursive class template Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This program ``` template<auto> struct A{}; template<int N, class T = A<[]{}>> struct B : B<N-1> {}; template<class T> struct B<0,T> {}; B<1, int> x; ``` is accepted by Clang but produces Internal Compiler Error in GCC. Demo: https://gcc.godbolt.org/z/z5aGj9ovr