This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c/10006: gcc segfaults on initializing flexible nested members


>Number:         10006
>Category:       c
>Synopsis:       gcc segfaults on initializing flexible nested members
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 08 14:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     p00ya at users dot sf dot net
>Release:        gcc version 3.2 20020927 (prerelease) Cygwin
>Organization:
>Environment:
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-3/configure --enable-languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-zlib --enable-nls --without-included-gettext --enable-interpreter --disable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020927 (prerelease)
>Description:
When initializing an array with a nested incomplete type, instead of the usual "initialization of flexible array member in a nested context" output, gcc segfaults.

struct incomplete_t
{
  int x;
  int y[];
};

struct incomplete_t a[] =
{
  {1, 2, {3, 4}}
};

>How-To-Repeat:
gcc test.i
(see attachment)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.i"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.i"

IyAxICJ0ZXN0LmMiCiMgMSAiPGJ1aWx0LWluPiIKIyAxICI8Y29tbWFuZCBsaW5lPiIKIyAxICJ0
ZXN0LmMiCnN0cnVjdCBpbmNvbXBsZXRlX3QKewogIGludCB4OwogIGludCB5W107Cn07CgpzdHJ1
Y3QgaW5jb21wbGV0ZV90IGFbXSA9CnsKICB7MSwgMiwgezMsIDR9fQp9Owo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]