https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85133
Bug ID: 85133 Summary: [7/8 Regression] [concepts] ICE with invalid concept used in variadic template 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 7.1.0: =========================================== template<typename> concept bool C; template<C...> struct A {}; A<int> a; =========================================== bug.cc:1:33: error: variable concept has no initializer template<typename> concept bool C; ^ bug.cc:5:6: internal compiler error: in iterative_hash_template_arg, at cp/pt.c:1713 A<int> a; ^ 0x64ed6f iterative_hash_template_arg(tree_node*, unsigned int) ../../gcc-7.1.0/gcc/cp/pt.c:1713 0x64e280 iterative_hash_template_arg(tree_node*, unsigned int) ../../gcc-7.1.0/gcc/cp/pt.c:1732 0x65826d concept_spec_hasher::hash(concept_spec_entry*) ../../gcc-7.1.0/gcc/cp/pt.c:25880 0x65826d hash_table<concept_spec_hasher, xcallocator>::find_slot(concept_spec_entry* const&, insert_option) ../../gcc-7.1.0/gcc/hash-table.h:414 0x65826d memoize_concept_satisfaction(tree_node*, tree_node*, tree_node*) ../../gcc-7.1.0/gcc/cp/pt.c:25941 0x85af29 satisfy_check_constraint ../../gcc-7.1.0/gcc/cp/constraint.cc:2058 0x85af29 satisfy_constraint_1 ../../gcc-7.1.0/gcc/cp/constraint.cc:2247 0x85b460 satisfy_constraint ../../gcc-7.1.0/gcc/cp/constraint.cc:2302 0x85b866 constraints_satisfied_p(tree_node*, tree_node*) ../../gcc-7.1.0/gcc/cp/constraint.cc:2414 0x66579c gen_elem_of_pack_expansion_instantiation ../../gcc-7.1.0/gcc/cp/pt.c:11048 0x66579c tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*) ../../gcc-7.1.0/gcc/cp/pt.c:11504 0x85a6d8 satisfy_pack_expansion ../../gcc-7.1.0/gcc/cp/constraint.cc:1983 0x85a6d8 satisfy_constraint_1 ../../gcc-7.1.0/gcc/cp/constraint.cc:2274 0x85b460 satisfy_constraint ../../gcc-7.1.0/gcc/cp/constraint.cc:2302 0x85b553 satisfy_associated_constraints ../../gcc-7.1.0/gcc/cp/constraint.cc:2326 0x85b896 constraints_satisfied_p(tree_node*, tree_node*) ../../gcc-7.1.0/gcc/cp/constraint.cc:2416 0x699158 lookup_template_class_1 ../../gcc-7.1.0/gcc/cp/pt.c:8707 0x699158 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc-7.1.0/gcc/cp/pt.c:9009 0x7af3dd finish_template_type(tree_node*, tree_node*, int) ../../gcc-7.1.0/gcc/cp/semantics.c:3151 0x736c44 cp_parser_template_id ../../gcc-7.1.0/gcc/cp/parser.c:15495 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