https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101670
Bug ID: 101670 Summary: Internal compiler error with concepts Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- ``` #include <type_traits> template <typename T, typename V = void, auto = []{}> constexpr bool is_incomplete = true; template <typename T> constexpr bool is_incomplete<T, std::enable_if_t<sizeof(T)>> = false; template <typename T> concept Incomplete = is_incomplete<T>; template <Incomplete> struct S {}; struct A; S<A> s1; ``` https://gcc.godbolt.org/z/McPf9v8s3 In substitution of 'template<class> requires Incomplete< <template-parameter-1-1> > struct S [with <template-parameter-1-1> = A]': <source>:10:4: required from here <source>:6:44: internal compiler error: in unify, at cp/pt.c:24165 6 | template <typename T> concept Incomplete = is_incomplete<T>; | ^~~~~~~~~~~~~~~~ 0x1d80e09 internal_error(char const*, ...) ???:0 0x7311fd fancy_abort(char const*, int, char const*) ???:0 0x9c9a26 most_specialized_partial_spec(tree_node*, int) ???:0 0x9caad5 instantiate_template(tree_node*, tree_node*, int) ???:0 0x9cb9d5 finish_template_variable(tree_node*, int) ???:0 0x9cbb56 lookup_and_finish_template_variable(tree_node*, tree_node*, int) ???:0 0x7b9d5a constraints_satisfied_p(tree_node*, tree_node*) ???:0 0x9a6c10 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ???:0 0x9ff09d finish_template_type(tree_node*, tree_node*, int) ???:0 0x95f1c5 c_parse_file() ???:0 0xae2a62 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions