PR C++/29002
* init.c (build_zero_init): If we have an error mark node for
the array size, return.
2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
PR C++/29002
* g++.dg/init/array22.C: New test.
* g++.dg/init/array23.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116962
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR C++/29002
+ * init.c (build_zero_init): If we have an error mark node for
+ the array size, return.
+
2006-09-10 Mark Mitchell <mark@codesourcery.com>
PR c++/28991
nelts, integer_one_node);
else
max_index = array_type_nelts (type);
+
+ /* If we have an error_mark here, we should just return error mark
+ as we don't know the size of the array yet. */
+ if (max_index == error_mark_node)
+ return error_mark_node;
gcc_assert (TREE_CODE (max_index) == INTEGER_CST);
/* A zero-sized array, which is accepted as an extension, will
+2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR C++/29002
+ * g++.dg/init/array22.C: New test.
+ * g++.dg/init/array23.C: New test.
+
2006-09-14 Arnaud Charlet <charlet@adacore.com>
* stackcheck.lst: Update list of tests requiring stack checking.
--- /dev/null
+// PR C++/29002
+// We ICE trying to set the "zero" initializer on the incomplete
+// array
+
+struct A {};
+int A::* x[]; // { dg-error "size" }
--- /dev/null
+// PR C++/29002
+// We ICE trying to set the "zero" initializer on the incomplete
+// array
+
+struct A {A();int A::* t;};
+A x[]; // { dg-error "size" }