c++/10660: (ICE) segfault with -O -Wunreachable-code -fgcse

denys.duchier@loria.fr denys.duchier@loria.fr
Wed May 7 11:36:00 GMT 2003


>Number:         10660
>Category:       c++
>Synopsis:       (ICE) segfault with -O -Wunreachable-code -fgcse
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed May 07 11:16:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     denys.duchier@loria.fr
>Release:        gcc 3.2.3
>Organization:
>Environment:
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: /var/tmp/portage/gcc-3.2.3-r1/work/gcc-3.2.3/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext
Thread model: posix
gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r1, propolice)
>Description:
compiling the attached file with options -O -Wunreachable-code -fgcse causes an ICE

bug.cc: In static member function `static MyName* MyName::newName(void*)':
bug.cc:29: internal error: Segmentation fault

The attached file is the smallest I could derive from the original file on which we noticed the ICE and still get this ICE
>How-To-Repeat:
g++  -O -Wunreachable-code -fgcse -c -o bug.o bug.cc
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="bug.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug.cc"

ZXh0ZXJuIHZvaWQgZ2V0TmV3SGVhcENodW5rKGNvbnN0IGludCk7CmV4dGVybiBib29sIGZsYWc7
CgppbmxpbmUgCnZvaWQgKiBoZWFwTWFsbG9jKGNvbnN0IGludCBzeikKewogcmV0cnk6CiAgewog
ICAgaWYgKGZsYWcpIHsKICAgICAgZ2V0TmV3SGVhcENodW5rKDApOwogICAgICBnb3RvIHJldHJ5
OwogICAgfQogICAgcmV0dXJuICh2b2lkKikgMDsKICB9Cn0KCmNsYXNzIE15TmFtZSB7CnByb3Rl
Y3RlZDoKICBpbnQgaG9tZU9yR05hbWU7CnB1YmxpYzoKICBzdGF0aWMgTXlOYW1lICpuZXdOYW1l
KHZvaWQgKik7Cn07CgpNeU5hbWUgKk15TmFtZTo6bmV3TmFtZSh2b2lkICpob21lKQp7CiAgTXlO
YW1lICpyZXQgPSAoTXlOYW1lKikgaGVhcE1hbGxvYyhzaXplb2YoTXlOYW1lKSk7CiAgcmV0LT5o
b21lT3JHTmFtZSA9IChpbnQpKGhvbWUpOwogIHJldHVybiByZXQ7Cn0K



More information about the Gcc-bugs mailing list