https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89917
Bug ID: 89917 Summary: [8/9 Regression] ICE with lambda in variadic template hierarchy Product: gcc Version: 9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following valid code snippet triggers an ICE since GCC 8.2.0, so this is a regression on the GCC 8 branch. ============================================= struct A { A(...); }; template<typename... T> struct B : T... { B() : T([]{})... {} }; B<A> b; ============================================= bug.cc: In instantiation of 'B<T>::B() [with T = {A}]': bug.cc:11:6: required from here bug.cc:8:16: internal compiler error: tree check: expected tree_vec, have type_pack_expansion in tsubst_initializer_list, at cp/pt.c:24915 8 | B() : T([]{})... {} | ^~~ 0x7da784 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9881 0x65d072 tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc/gcc/tree.h:3176 0x65d072 tsubst_initializer_list ../../gcc/gcc/cp/pt.c:24915 0x9ff648 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:16981 0x9ff95d tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:16976 0x9fea39 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/gcc/cp/pt.c:17277 0x9fe3b8 instantiate_decl(tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:24730 0xa244db instantiate_pending_templates(int) ../../gcc/gcc/cp/pt.c:24846 0x941600 c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.c:4818 Please submit a full bug report, [etc.]