summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f618fa557d1..550a1cb021c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6600,7 +6600,7 @@ convert_template_argument (tree parm,
argument specification is valid. */
val = convert_nontype_argument (t, orig_arg, complain);
else
- val = orig_arg;
+ val = strip_typedefs_expr (orig_arg);
if (val == NULL_TREE)
val = error_mark_node;
@@ -16598,6 +16598,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
&& !TEMPLATE_PARM_PARAMETER_PACK (parm))
return unify_parameter_pack_mismatch (explain_p, parm, arg);
+ arg = strip_typedefs_expr (arg);
TREE_VEC_ELT (INNERMOST_TEMPLATE_ARGS (targs), idx) = arg;
return unify_success (explain_p);