This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5748: g++ dies with optimization
- From: jwheeler at us dot ibm dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 21 Feb 2002 21:20:08 -0000
- Subject: c++/5748: g++ dies with optimization
- Reply-to: jwheeler at us dot ibm dot com
>Number: 5748
>Category: c++
>Synopsis: g++ dies with optimization
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 21 13:26:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Joel Wheeler
>Release: g++ 3.0.3
>Organization:
>Environment:
Configured with: ../gcc303src/gcc-3.0.3/configure --prefix=/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303
Thread model: single
gcc version 3.0.3
/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEP
linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ testcase.cpp testcase.ii
GNU CPP version 3.0.3 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/include/g++-v3
/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/include/g++-v3/i686-pc-linux-gnu
/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/include/g++-v3/backward
/usr/local/include
/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/include
/usr/include
End of search list.
/afs/btv.ibm.com/u1/tds6000/v5/contrib/gcc303/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/cc1plus -fpreprocessed testcase.ii -quiet -dumpbase testcase.cpp -O2 -Wall -version -o testcase.s
GNU CPP version 3.0.3 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.0.3 (i686-pc-linux-gnu)
compiled by GNU C version 3.0.3.
>Description:
Compiler dies during compiling when compiling using optimization.
When compiling with [-g] flag instead of -O1 or -O2 there is no compiler error.
See the following error when compiling:
testcase.cpp: In method `int TESTCLASS::kill_compiler()':
testcase.cpp:18: warning: unused variable `long unsigned int efi'
testcase.cpp:24: Internal compiler error in elimination_effects, at reload1.c:
2696
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
I didnt include preprocessed source since Ive boiled the testcase down as much as possible (very small)
>How-To-Repeat:
g++ -O2 testcase.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="testcase.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="testcase.cpp"
Ly8gY29tcGlsZSB3aXRoICJnKysgLU8yIHRlc3RjYXNlLmNwcCINCg0KY2xhc3MgVEVTVENMQVNT
ICAgew0KDQogIHB1YmxpYzoNCiAgICBURVNUQ0xBU1MoKTsNCiAgICB+VEVTVENMQVNTKCk7DQoN
CiAgICBpbnQgICAgICAgIGtpbGxfY29tcGlsZXIoKTsNCiAgICBpbnQgICAgICAgIHJlYWQodm9p
ZCAgKnBfZGF0YSwgdW5zaWduZWQgbG9uZyBuYnl0ZXMpOw0KfTsNCg0KaW50IFRFU1RDTEFTUzo6
a2lsbF9jb21waWxlcigpIHsNCg0KICB1bmlvbiB7DQogICAgdW5zaWduZWQgbG9uZyAgICAgIGVm
Ow0KICAgIHVuc2lnbmVkIGxvbmcgICAgICBlZmk7DQogIH07DQoNCiAgLy8gVGhpcyBsaW5lIGNh
dXNlcyB0aGUgaW50ZXJuYWwgY29tcGlsZXIgZXJyb3I6DQogIGlmIChyZWFkKCZlZiwgc2l6ZW9m
KHVuc2lnbmVkIGxvbmcpKSAhPSAzMikgcmV0dXJuIDE2Ow0KICByZXR1cm4gMDsNCg0KfQ0KDQpp
bnQgbWFpbigpIHt9DQo=