https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85147
Bug ID: 85147 Summary: [6/7/8 Regression] ICE with invalid variadic template-template parameter Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: error-recovery, 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 triggers an ICE since GCC 6.1.0: ==================================================== template<typename T> struct A { template<template<...T> class...> struct B {}; }; A<int>::B<> b; ==================================================== bug.cc:3:21: error: expected identifier before '...' token template<template<...T> class...> struct B {}; ^~~ bug.cc: In instantiation of 'struct A<int>': bug.cc:6:7: required from here bug.cc:3:44: internal compiler error: in fixed_parameter_pack_p_1, at cp/pt.c:5113 template<template<...T> class...> struct B {}; ^ 0x630249 fixed_parameter_pack_p_1 ../../gcc/gcc/cp/pt.c:5113 0x94c1f9 fixed_parameter_pack_p_1 ../../gcc/gcc/cp/pt.c:5117 0x95edc4 fixed_parameter_pack_p(tree_node*) ../../gcc/gcc/cp/pt.c:5144 0x9824ef coerce_template_parameter_pack ../../gcc/gcc/cp/pt.c:8067 0x9824ef coerce_template_parms ../../gcc/gcc/cp/pt.c:8377 0x986308 coerce_innermost_template_parms ../../gcc/gcc/cp/pt.c:8587 0x97b9b6 lookup_template_class_1 ../../gcc/gcc/cp/pt.c:9032 0x97b9b6 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:9381 0x97d48a tsubst_aggr_type ../../gcc/gcc/cp/pt.c:12315 0x977a2e tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:13944 0x9815ad tsubst_template_decl ../../gcc/gcc/cp/pt.c:12849 0x97daef tsubst_decl ../../gcc/gcc/cp/pt.c:12970 0x977b2f tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/gcc/cp/pt.c:13862 0x990c3a instantiate_class_template_1 ../../gcc/gcc/cp/pt.c:10851 0x990c3a instantiate_class_template(tree_node*) ../../gcc/gcc/cp/pt.c:11100 0x9d7b4d complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:136 0x9355aa cp_parser_nested_name_specifier_opt ../../gcc/gcc/cp/parser.c:6447 0x93e463 cp_parser_constructor_declarator_p ../../gcc/gcc/cp/parser.c:26539 0x93e463 cp_parser_decl_specifier_seq ../../gcc/gcc/cp/parser.c:13616 0x943c90 cp_parser_simple_declaration ../../gcc/gcc/cp/parser.c:12937 Please submit a full bug report, [etc.]