[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#131399: gcc-3.0: Initialization of flexible char array member sefgaults



Package: gcc-3.0
Version: 1:3.0.3-1
Severity: normal

Hi,

falk@borkum:~% cat bug.c 
struct descr {
    int len;
    char data[];
};
int foo() {
    struct descr s1 = { 3, "FOO" };
}
falk@borkum:~% /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.

I'm not entirely sure if the code is standard compliant (I've no copy
of the standard). In any case, gcc shouldn't segfault.

	Falk


-- System Information
Debian Release: 3.0
Architecture: alpha
Kernel: Linux borkum 2.4.16 #1 Sat Dec 1 23:02:59 CET 2001 alpha
Locale: LANG=C, LC_CTYPE=de_DE

Versions of packages gcc-3.0 depends on:
ii  binutils                2.11.92.0.12.3-5 The GNU assembler, linker and bina
ii  cpp-3.0                 1:3.0.3-1        The GNU C preprocessor.
ii  gcc-3.0-base            1:3.0.3-1        The GNU Compiler Collection (base 
ii  libc6.1                 2.2.4-7          GNU C Library: Shared libraries an
ii  libgcc1                 1:3.0.3-1        GCC support library.




Reply to: