aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorRyan Burn <contact@rnburn.com>2015-12-07 21:45:13 +0000
committerJason Merrill <jason@gcc.gnu.org>2015-12-07 16:45:13 -0500
commit17c6c56b906d99b45dc5eefa5d39435188235051 (patch)
treee0ef45fd2c4e7514278542421bdec3eb0710bfc2 /gcc/cp
parent0be72a6b4bc5d9de78d03d761ad9fdf0c1fa744d (diff)
downloadgcc-17c6c56b906d99b45dc5eefa5d39435188235051.zip
gcc-17c6c56b906d99b45dc5eefa5d39435188235051.tar.gz
gcc-17c6c56b906d99b45dc5eefa5d39435188235051.tar.bz2
re PR c++/68683 ([concepts] function satisfy_argument_deduction_constraint modifies a type tree node but leaves TYPE_CANONICAL unchanged)
PR c++/68683 * constraint.cc (satisfy_argument_deduction_constraint): Set TYPE_CANONICAL to NULL_TREE if PLACEHOLDER_TYPE_CONSTRAINTS are changed. From-SVN: r231385
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/constraint.cc3
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5232534..6b007e2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2015-12-07 Ryan Burn <contact@rnburn.com>
+
+ PR c++/68683
+ * constraint.cc (satisfy_argument_deduction_constraint): Set
+ TYPE_CANONICAL to NULL_TREE if PLACEHOLDER_TYPE_CONSTRAINTS are
+ changed.
+
2015-12-07 Jason Merrill <jason@redhat.com>
PR c++/68464
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index 89da6ec..426d8f3 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -1871,11 +1871,14 @@ satisfy_argument_deduction_constraint (tree t, tree args,
tree pattern = DEDUCT_CONSTR_PATTERN (t);
tree placeholder = DEDUCT_CONSTR_PLACEHOLDER (t);
tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (placeholder);
+ tree type_canonical = TYPE_CANONICAL (placeholder);
PLACEHOLDER_TYPE_CONSTRAINTS (placeholder)
= tsubst_constraint (constr, args, complain|tf_partial, in_decl);
+ TYPE_CANONICAL (placeholder) = NULL_TREE;
tree type = do_auto_deduction (pattern, init, placeholder,
complain, adc_requirement);
PLACEHOLDER_TYPE_CONSTRAINTS (placeholder) = constr;
+ TYPE_CANONICAL (placeholder) = type_canonical;
if (type == error_mark_node)
return boolean_false_node;