https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84980
Bug ID: 84980 Summary: [concepts] ICE with missing typename in cocept 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 "-fconcpets") triggers an ICE since GCC 6.1.0: ======================================== template<T> concept bool C = true; template<C...> struct A; ======================================== bug.cc:1:10: error: 'T' has not been declared template<T> concept bool C = true; ^ bug.cc:3:11: internal compiler error: tree check: expected class 'expression', have 'exceptional' (error_mark) in tree_operand_check, at tree.h:3633 template<C...> struct A; ^~~ 0x78c78a tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/gcc/tree.c:9372 0x5e8cf2 expr_check(tree_node*, char const*, int, char const*) ../../gcc/gcc/tree.h:3304 0x5e8cf2 tree_operand_check(tree_node*, int, char const*, int, char const*) ../../gcc/gcc/tree.h:3633 0x5e8cf2 finish_shorthand_constraint(tree_node*, tree_node*) ../../gcc/gcc/cp/constraint.cc:1277 0x95d90d process_template_parm(tree_node*, unsigned int, tree_node*, bool, bool) ../../gcc/gcc/cp/pt.c:4430 0x93f273 cp_parser_template_parameter_list ../../gcc/gcc/cp/parser.c:15059 0x94294c cp_parser_explicit_template_declaration ../../gcc/gcc/cp/parser.c:27111 0x94294c cp_parser_template_declaration_after_export ../../gcc/gcc/cp/parser.c:27145 0x947d39 cp_parser_declaration ../../gcc/gcc/cp/parser.c:12729 0x948021 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:12656 0x948314 cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4561 0x948314 c_parse_file() ../../gcc/gcc/cp/parser.c:39008 0xa47716 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1132 Please submit a full bug report, [etc.]