aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 5f181a5..0aa4ac2 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5467,7 +5467,9 @@ maybe_deduce_size_from_array_init (tree decl, tree init)
failure = 1;
}
- if (!failure)
+ if (failure)
+ TREE_TYPE (decl) = error_mark_node;
+ else
{
failure = cp_complete_array_type (&TREE_TYPE (decl), initializer,
do_default);