https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85006
Bug ID: 85006 Summary: [7/8 Regression] [concepts] ICE with bogus parameter pack Product: gcc Version: 8.0.1 Status: UNCONFIRMED Keywords: ice-on-invalid-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 invalid code snippet (compiled with "-fconcepts" triggers an ICE since GCC 7.1.0: ======================================================== template<typename...> struct A {}; template<typename...> A<auto...> foo() { return {}; } void bar() { foo(); } ======================================================== bug.cc: In substitution of 'template<class ...> A<auto ...> foo() [with <template-parameter-1-1> = {}]': bug.cc:7:7: required from here bug.cc:3:34: internal compiler error: in tsubst_pack_expansion, at cp/pt.c:11826 template<typename...> A<auto...> foo() { return {}; } ^~~ 0x6482a9 tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:11826 0x97fb7a tsubst_template_args ../../gcc/gcc/cp/pt.c:12062 0x97fa88 tsubst_template_args ../../gcc/gcc/cp/pt.c:12080 0x97c425 tsubst_aggr_type ../../gcc/gcc/cp/pt.c:12293 0x9769ee tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:13925 0x9796a4 tsubst_function_type ../../gcc/gcc/cp/pt.c:13637 0x976253 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:14391 0x95f6dd tsubst_function_decl ../../gcc/gcc/cp/pt.c:12556 0x97c626 tsubst_decl ../../gcc/gcc/cp/pt.c:12955 0x976aef tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:13843 0x985662 instantiate_template_1 ../../gcc/gcc/cp/pt.c:18824 0x985662 instantiate_template(tree_node*, tree_node*, int) ../../gcc/gcc/cp/pt.c:18880 0x98c5c7 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../../gcc/gcc/cp/pt.c:19260 0x82b09f add_template_candidate_real ../../gcc/gcc/cp/call.c:3179 0x82bab0 add_template_candidate ../../gcc/gcc/cp/call.c:3258 0x82bab0 add_candidates ../../gcc/gcc/cp/call.c:5523 0x82bed1 add_candidates ../../gcc/gcc/cp/call.c:4195 0x82bed1 perform_overload_resolution ../../gcc/gcc/cp/call.c:4203 0x82df52 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ../../gcc/gcc/cp/call.c:4276 0x9abb15 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/gcc/cp/semantics.c:2500 Please submit a full bug report, [etc.]