https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101532
Bug ID: 101532 Summary: [12 Regression] ICE in finish_expr_stmt, at cp/semantics.c:859 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20210704 and 20210711 : $ cat z1.cc class A { ~A() {} }; template <class> class B { A f = [] {}; }; B<int> c; $ cat z2.cc class A { ~A() {} }; template <class T> class B { A f = [](T) {}; }; B<int> c; $ g++-12-20210718 -c z1.cc z1.cc: In function 'void __static_initialization_and_destruction_0(int, int)': z1.cc:7:8: internal compiler error: in finish_expr_stmt, at cp/semantics.c:859 7 | B<int> c; | ^ 0x9d659c finish_expr_stmt(tree_node*) ../../gcc/cp/semantics.c:859 0x826644 one_static_initialization_or_destruction ../../gcc/cp/decl2.c:4118 0x826d56 do_static_initialization_or_destruction ../../gcc/cp/decl2.c:4216 0x82d58e c_parse_final_cleanups() ../../gcc/cp/decl2.c:5062