This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/31804] New: gcc segfaults on very long pointer chains
- From: "rwxr-xr-x at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2007 20:10:45 -0000
- Subject: [Bug c/31804] New: gcc segfaults on very long pointer chains
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ perl -wle 'print "int", "*" x 999999, "p;"' >try.c && gcc try.c
gcc: Internal error: Segmentation fault (program cc1)
...
$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.1.1-r3/work/gcc-4.1.1/configure --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --disable-libunwind-exceptions
--disable-multilib --disable-libmudflap --disable-libssp --enable-java-awt=gtk
--enable-languages=c,c++,java,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1-r3)
gcc-4.3-20070427 seems to have the same problem.
3.4.6 works fine, but after increasing the number of *'s to 99999999 it says:
cc1: out of memory allocating 1677721600 bytes after a total of 845819904 bytes
So this problem seems to be new in gcc4.
--
Summary: gcc segfaults on very long pointer chains
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rwxr-xr-x at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31804