* c-typeck.c (really_start_incremental_init): Reset
constructor_max_index for arrays of incomplete type.
testsuite:
* gcc.dg/c99-init-4.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94595
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-02-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ PR c/19435
+ * c-typeck.c (really_start_incremental_init): Reset
+ constructor_max_index for arrays of incomplete type.
+
2005-02-02 Jeff Law <law@redhat.com>
* gcse.c (struct reg_set): Store the block index where the register
TYPE_MIN_VALUE (TYPE_DOMAIN (constructor_type)));
}
else
- constructor_index = bitsize_zero_node;
+ {
+ constructor_index = bitsize_zero_node;
+ constructor_max_index = NULL_TREE;
+ }
constructor_unfilled_index = constructor_index;
}
+2005-02-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ PR c/19435
+ * gcc.dg/c99-init-4.c: New test.
+
2005-02-01 Janis Johnson <janis187@us.ibm.com>
* g++.old-deja/g++.other/init5.C: Remove xfail for powerpc-linux.
--- /dev/null
+/* Test for nested initialization of a compound literal: must not be
+ checked against outer array bounds. Bug 19435. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+struct s { char *p; };
+struct s a[1] = { { .p = ((char []){ 1, 2 }) } };