diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc index 9049d087859..31e0fb5079a 100644 --- a/gcc/cp/constraint.cc +++ b/gcc/cp/constraint.cc @@ -1345,7 +1345,6 @@ build_concept_check_arguments (tree arg, tree rest) } else { - gcc_assert (rest != NULL_TREE); args = rest; } return args; @@ -1444,13 +1443,6 @@ build_concept_check (tree target, tree args, tsubst_flags_t complain) tree build_concept_check (tree decl, tree arg, tree rest, tsubst_flags_t complain) { - if (arg == NULL_TREE && rest == NULL_TREE) - { - tree id = build_nt (TEMPLATE_ID_EXPR, decl, rest); - error ("invalid use concept %qE", id); - return error_mark_node; - } - tree args = build_concept_check_arguments (arg, rest); if (standard_concept_p (decl)) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-variadic3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-variadic3.C new file mode 100644 index 00000000000..6fa7113e734 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-variadic3.C @@ -0,0 +1,7 @@ +// PR c++/98717 +// { dg-do compile { target c++20 } } + +template +concept True = true; + +static_assert(True<>);