[PATCH] PR88395 Fix Nullptr when compiling with -fconcepts

Nicholas Krause xerofoify@gmail.com
Mon Apr 8 23:56:00 GMT 2019


This fixes the caller in tsubst_requires_expr to
tsubst_constraint_variables to wrap their respective
trees in PARM_CONSTR_PARMS. This is to get the correct
parmeter constraints from the tree before calling
tsubst_constraint_variables like other callers
in constraint.cc and to fix the bug id, 88395 on
the gcc bugzilla. OK for merge?

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 gcc/cp/constraint.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index 9884eb0db50..a78d0a9a49b 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -1882,7 +1882,7 @@ tsubst_requires_expr (tree t, tree args,
   tree parms = TREE_OPERAND (t, 0);
   if (parms)
     {
-      parms = tsubst_constraint_variables (parms, args, complain, in_decl);
+      parms = tsubst_constraint_variables (PARM_CONSTR_PARMS (parms), args, complain, in_decl);
       if (parms == error_mark_node)
         return error_mark_node;
     }
-- 
2.17.1



More information about the Gcc-patches mailing list