>Submitter-Id: net >Originator: Falk Hueffner <[EMAIL PROTECTED]> >Organization: The Debian project >Confidential: no >Synopsis: [regression from 2.95.3] Initialization of flexible char array >member segfaults >Severity: non-critical >Priority: low >Category: c >Class: ice-on-illegal-code >Release: 3.0.4 CVS and HEAD CVS 20020203 >Environment: System: Debian GNU/Linux (testing/unstable) Architecture: i686, alpha host: i386-linux build: i386-linux target: i386-linux configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux >Description: [ Reported to the Debian BTS as report #131399. Please CC [EMAIL PROTECTED] on replies. Log of report can be found at http://bugs.debian.org/131399 ]
Segfaults with 3.0.4 CVS and HEAD CVS 20020203, 2.95.x prints: $ gcc-2.95 -c bug-131399.c bug-131399.c:3: field `data' has incomplete type bug-131399.c: In function `foo': bug-131399.c:6: invalid initializer bug-131399.c:6: (near initialization for `s1.data') struct descr { int len; char data[]; }; int foo() { struct descr s1 = { 3, "FOO" }; } [EMAIL PROTECTED]:~% /usr/bin/gcc-3.0 bug.c bug.c: In function `foo': bug.c:6: Internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. >How-To-Repeat: >Fix: