aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index dd86cee..9fd06b3 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5526,6 +5526,13 @@ convert_template_argument (tree parm,
if (TYPE_P (val))
val = strip_typedefs (val);
}
+ else if (TREE_CODE (orig_arg) == SCOPE_REF)
+ {
+ /* Strip typedefs from the SCOPE_REF. */
+ tree type = strip_typedefs (TREE_TYPE (orig_arg));
+ tree scope = strip_typedefs (TREE_OPERAND (orig_arg, 0));
+ val = build2 (SCOPE_REF, type, scope, TREE_OPERAND (orig_arg, 1));
+ }
else
{
tree t = tsubst (TREE_TYPE (parm), args, complain, in_decl);