]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/semantics.c
re PR c++/37531 (ICE with invalid array initialization)
[thirdparty/gcc.git] / gcc / cp / semantics.c
index cfd06bb08cb880f2bc350ee8623cbdcc36dacbf5..c6f921a968d350859d41c3c1a616f53ed51fb9d2 100644 (file)
@@ -2105,6 +2105,9 @@ finish_unary_op_expr (enum tree_code code, tree expr)
 tree
 finish_compound_literal (tree type, tree compound_literal)
 {
+  if (type == error_mark_node)
+    return error_mark_node;
+
   if (!TYPE_OBJ_P (type))
     {
       error ("compound literal of non-object type %qT", type);