https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85137
Bug ID: 85137 Summary: [concepts] ICE with undeclared concept 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<template<typename> requires C class> struct A {}; template<typename> requires true struct B {}; A<B> a; ============================================================== bug.cc:1:38: error: 'C' was not declared in this scope template<template<typename> requires C class> struct A {}; ^ bug.cc:5:4: internal compiler error: in non_atomic_constraint_p, at cp/logic.cc:318 A<B> a; ^ 0x617ec5 non_atomic_constraint_p ../../gcc/gcc/cp/logic.cc:318 0x8e36e0 any_p<std::_List_iterator<tree_node*>, bool (*)(tree_node*)> ../../gcc/gcc/cp/logic.cc:67 0x8e36e0 any_non_atomic_constraints_p ../../gcc/gcc/cp/logic.cc:327 0x8e36e0 analyze_atom ../../gcc/gcc/cp/logic.cc:359 0x8e36e0 analyze_term ../../gcc/gcc/cp/logic.cc:468 0x8e36e0 check_term ../../gcc/gcc/cp/logic.cc:495 0x8e28df check_goal ../../gcc/gcc/cp/logic.cc:511 0x8e28df check_proof ../../gcc/gcc/cp/logic.cc:537 0x8e28df prove_implication ../../gcc/gcc/cp/logic.cc:754 0x8e3499 prove_implication ../../gcc/gcc/cp/logic.cc:731 0x8e3499 subsumes_constraints_nonnull ../../gcc/gcc/cp/logic.cc:786 0x8e3499 subsumes(tree_node*, tree_node*) ../../gcc/gcc/cp/logic.cc:803 0x98488b is_compatible_template_arg ../../gcc/gcc/cp/pt.c:7705 0x98488b convert_template_argument ../../gcc/gcc/cp/pt.c:7944 0x982893 coerce_template_parms ../../gcc/gcc/cp/pt.c:8480 0x97ba36 lookup_template_class_1 ../../gcc/gcc/cp/pt.c:9032 0x97ba36 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/gcc/cp/pt.c:9381 0x9ac5bd finish_template_type(tree_node*, tree_node*, int) ../../gcc/gcc/cp/semantics.c:3227 0x928784 cp_parser_template_id ../../gcc/gcc/cp/parser.c:15852 0x92888e cp_parser_class_name ../../gcc/gcc/cp/parser.c:22383 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