PR c/9799
* c-typeck.c (push_init_level): Add sanity check.
From-SVN: r63831
+2003-03-05 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR c/9799
+ * c-typeck.c (push_init_level): Add sanity check.
+
Wed Mar 5 02:04:04 CET 2003 Jan Hubicka <jh@suse.cz>
* toplev.c (rest_of_compilation): Deffer RTL compilation only when
&& constructor_fields == 0)
process_init_element (pop_init_level (1));
else if (TREE_CODE (constructor_type) == ARRAY_TYPE
+ && constructor_max_index
&& tree_int_cst_lt (constructor_max_index, constructor_index))
process_init_element (pop_init_level (1));
else
+2003-03-05 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * gcc.c-torture/compile/20030305-1.c
+
Wed Mar 5 02:05:19 CET 2003 Jan Hubicka <jh@suse.cz>
* gcc.dg/i386-local.c: New.
--- /dev/null
+/* PR c/9799 */
+/* Verify that GCC doesn't crash on excess elements
+ in initializer for a flexible array member. */
+
+typedef struct {
+ int aaa;
+} s1_t;
+
+typedef struct {
+ int bbb;
+ s1_t s1_array[];
+} s2_t;
+
+static s2_t s2_array[]= {
+ { 1, 4 },
+ { 2, 5 },
+ { 3, 6 }
+};