Bug 10006 - gcc segfaults on initializing flexible nested members
Summary: gcc segfaults on initializing flexible nested members
Status: RESOLVED DUPLICATE of bug 9799
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Eric Botcazou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-08 14:56 UTC by p00ya
Modified: 2003-06-12 00:15 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
test.i (115 bytes, text/x-c)
2003-05-21 15:17 UTC, p00ya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description p00ya 2003-03-08 14:56:00 UTC
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}}
};

Release:
gcc version 3.2 20020927 (prerelease) Cygwin

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)

How-To-Repeat:
gcc test.i
(see attachment)
Comment 1 Eric Botcazou 2003-03-08 15:15:45 UTC
*** This bug has been marked as a duplicate of 9799 ***