diff options
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a3b5b0a2f0c..4e9c386d8fb 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -24482,6 +24482,9 @@ static GTY (()) hash_table<constr_hasher> *decl_constraints; tree get_constraints (tree t) { + if (!flag_concepts) + return NULL_TREE; + gcc_assert (DECL_P (t)); if (TREE_CODE (t) == TEMPLATE_DECL) t = DECL_TEMPLATE_RESULT (t); @@ -24503,7 +24506,7 @@ set_constraints (tree t, tree ci) { if (!ci) return; - gcc_assert (t); + gcc_assert (t && flag_concepts); if (TREE_CODE (t) == TEMPLATE_DECL) t = DECL_TEMPLATE_RESULT (t); gcc_assert (!get_constraints (t)); |