https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103811
Bug ID: 103811 Summary: [c++20] ICE when a lambda is used as a template argument of another lambda's function parameter Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: iamsupermouse at mail dot ru Target Milestone: --- Following code causes an ICE (segfault): template <auto> struct A {}; int main() {[](A<[]{}>){};} Tested on https://godbolt.org/ , GCC trunk 12.0.0 20211222. The same thing happens if I move the nested lambda to A's default argument: template <auto = []{}> struct A {}; int main() {[](A<>){};} MSVC also ICEs on the second snippet, but not on the first.