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 9a6f2fc9cc6..3c301f2adaa 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6330,7 +6330,8 @@ tsubst_aggr_type (tree t,
in_decl, /*entering_scope=*/1);
/* If context is a nested class inside a class template,
it may still need to be instantiated (c++/33959). */
- complete_type (context);
+ if (TYPE_P (context))
+ complete_type (context);
}
/* Then, figure out what arguments are appropriate for the