public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Matthias Klose <doko@klose.in-berlin.de>
To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org
Subject: c/5597: [regression from 2.95.3] Initialization of flexible char array member segfaults
Date: Tue, 05 Feb 2002 15:36:00 -0000	[thread overview]
Message-ID: <E16YEvS-0003Ls-00@gate.local> (raw)


>Number:         5597
>Category:       c
>Synopsis:       [regression from 2.95.3] Initialization of flexible char array member segfaults
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 05 15:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
>Release:        3.0.4 CVS and HEAD CVS 20020203
>Organization:
The Debian project
>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 131399-quiet@bugs.debian.org 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" };
}
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.

>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-02-05 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05 15:36 Matthias Klose [this message]
2002-03-21 17:57 rth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E16YEvS-0003Ls-00@gate.local \
    --to=doko@klose.in-berlin.de \
    --cc=131399-quiet@bugs.debian.org \
    --cc=debian-gcc@lists.debian.org \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).