https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85263
Bug ID: 85263 Summary: [concepts] ICE with parameter pack matching 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 Blocks: 67491 Target Milestone: --- The following invalid code snippet (compiled with "-fconcepts") triggers an ICE since GCC 6.1.0: ======================================================= template<typename..., int...> concept bool C = true; C{A, B} void foo(); ======================================================= bug.cc:3:3: error: cannot match pack for introduced parameter C{A, B} void foo(); ^ bug.cc:3:7: internal compiler error: tree check: accessed elt 1 of tree_vec with 0 elts in process_introduction_parm, at cp/constraint.cc:1325 C{A, B} void foo(); ^ 0x78f405 tree_vec_elt_check_failed(int, int, char const*, int, char const*) ../../gcc/gcc/tree.c:9520 0x5e94ec tree_vec_elt_check(tree_node*, int, char const*, int, char const*) ../../gcc/gcc/tree.h:3356 0x5e94ec process_introduction_parm ../../gcc/gcc/cp/constraint.cc:1325 0x5e94ec finish_template_introduction(tree_node*, tree_node*) ../../gcc/gcc/cp/constraint.cc:1408 0x944368 cp_parser_template_introduction ../../gcc/gcc/cp/parser.c:27066 0x944368 cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:27170 0x949714 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12767 0x949b31 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12648 0x949e24 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4563 0x949e24 c_parse_file() ../../gcc/gcc/cp/parser.c:39029 0xa49bb6 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1132 Please submit a full bug report, [etc.] Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 [Bug 67491] [meta-bug] concepts issues