[Bug c/34308] New: gcc internal error (seg fault) (program cc1) with ill formed foo.c
dominique dot pelle at free dot fr
gcc-bugzilla@gcc.gnu.org
Sat Dec 1 08:37:00 GMT 2007
gcc gives an internal error when compiling a source
file which contains _lots_ of stars '*' (pointer of pointer
of pointer etc.) The source file looks admitedly silly but
it should not cause gcc to segfault.
This bug was filed in Ubuntu bug database:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/172326
Steps to reproduce bug:
1/ download test-case-crash-gcc.c (stand alone, no #include files)
$ wget http://dominique.pelle.free.fr/test-case-crash-gcc.c
2/ compile it and observe an internal error, segfault:
$ gcc test-case-crash-gcc.c
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
$ gcc -V 4.2 test-case-crash-gcc.c
i486-linux-gnu-gcc-4.2: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
I could reproduce this bug with 2 versions of gcc
that I have on my Ubunto laptop: gcc-4.1.3 and gcc-4.2.1:
$ gcc --version
gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -V 4.2 --version
i486-linux-gnu-gcc-4.2 (GCC) 4.2.1 (Ubuntu 4.2.1-5ubuntu4)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I'm using Linux-2.6.20 (x86) (Ubuntu Gutsy).
--
Summary: gcc internal error (seg fault) (program cc1) with ill
formed foo.c
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominique dot pelle at free dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34308
More information about the Gcc-bugs
mailing list