summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c281636286f..3327110f949 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -7152,7 +7152,7 @@ tsubst_expr (t, args, complain, in_decl)
{
if (TREE_CODE (decl) != TYPE_DECL)
/* Make sure the type is instantiated now. */
- complete_type (type);
+ complete_type (TREE_TYPE (decl));
if (init)
DECL_INITIAL (decl) = error_mark_node;
/* By marking the declaration as instantiated, we avoid
OpenPOWER on IntegriCloud