From a23f90493ebe3378ede644d1500146614dcc62e9 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 19 Jul 2016 23:33:21 -0400 Subject: Shortcut get_constraints when !flag_concepts. --- gcc/cp/pt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/cp/pt.c') 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 *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)); -- cgit v1.2.1