summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 22:13:23 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-25 22:13:23 +0000
commitd55ee8d13d5eb53ed62500b8f26c6f94d976da1f (patch)
tree3373f7297e990618b02db7c30e9cfbf833a89311 /gcc/cp/pt.c
parent59ec98b2074c28050b606f2571a6ea2a3ba93779 (diff)
downloadgcc-d55ee8d13d5eb53ed62500b8f26c6f94d976da1f.tar.gz
PR c++/68434
* pt.c (tsubst): Set PLACEHOLDER_TYPE_CONSTRAINTS before calling canonical_type_parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230909 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5868be2e7f2..24322837326 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12977,6 +12977,12 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
TYPE_POINTER_TO (r) = NULL_TREE;
TYPE_REFERENCE_TO (r) = NULL_TREE;
+ /* Propagate constraints on placeholders. */
+ if (TREE_CODE (t) == TEMPLATE_TYPE_PARM)
+ if (tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (t))
+ PLACEHOLDER_TYPE_CONSTRAINTS (r)
+ = tsubst_constraint (constr, args, complain, in_decl);
+
if (TREE_CODE (r) == TEMPLATE_TEMPLATE_PARM)
/* We have reduced the level of the template
template parameter, but not the levels of its
@@ -12991,12 +12997,6 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl)
else
TYPE_CANONICAL (r) = canonical_type_parameter (r);
- /* Propagate constraints on placeholders. */
- if (TREE_CODE (t) == TEMPLATE_TYPE_PARM)
- if (tree constr = PLACEHOLDER_TYPE_CONSTRAINTS (t))
- PLACEHOLDER_TYPE_CONSTRAINTS (r)
- = tsubst_constraint (constr, args, complain, in_decl);
-
if (code == BOUND_TEMPLATE_TEMPLATE_PARM)
{
tree argvec = tsubst (TYPE_TI_ARGS (t), args,