aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/cp-gimplify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c
index e8fbc30..0e949e2 100644
--- a/gcc/cp/cp-gimplify.c
+++ b/gcc/cp/cp-gimplify.c
@@ -1205,7 +1205,8 @@ predeclare_vla (tree expr)
return expr;
vla = TREE_TYPE (vla);
}
- if (TYPE_NAME (vla) || !variably_modified_type_p (vla, NULL_TREE))
+ if (vla == type || TYPE_NAME (vla)
+ || !variably_modified_type_p (vla, NULL_TREE))
return expr;
tree decl = build_decl (input_location, TYPE_DECL, NULL_TREE, vla);