This fixes bug id,88395 by checking if the second tree reqs is correctly not a null pointer before calling the function, tsubst_requirement_body. Otherwise we will get a nullptr if compiling with -fconcepts for concepts enabled.
Signed-off-by: Nicholas Krause <xerofo...@gmail.com> --- gcc/cp/constraint.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc index 9884eb0db50..a4bf1632021 100644 --- a/gcc/cp/constraint.cc +++ b/gcc/cp/constraint.cc @@ -1888,9 +1888,11 @@ tsubst_requires_expr (tree t, tree args, } tree reqs = TREE_OPERAND (t, 1); + if (reqs) { reqs = tsubst_requirement_body (reqs, args, complain, in_decl); if (reqs == error_mark_node) return error_mark_node; + } return finish_requires_expr (parms, reqs); } -- 2.17.1