This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/5337: gcc-3.0.3 segfaults with -O3
- From: thirsima at james dot hut dot fi
- To: gcc-gnats at gcc dot gnu dot org
- Date: Wed, 9 Jan 2002 18:44:48 +0200
- Subject: c++/5337: gcc-3.0.3 segfaults with -O3
- Reply-to: thirsima at james dot hut dot fi
>Number: 5337
>Category: c++
>Synopsis: gcc-3.0.3 gives internal error
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Wed Jan 09 08:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Teemu Hirsimäki
>Release: 3.0.3
>Organization:
>Environment:
System: Linux itl-pc55.hut.fi 2.2.16-3smp #1 SMP Mon Jun 19 19:00:35 EDT 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.0.3/configure --prefix=/r
>Description:
The compiler segfaults when -O3 is used, but works with -O2 or without optimization:
18:15:50 itl-pc55 ~/bug $g++ -v -save-temps -c -O3 Matrix.cc
Reading specs from /r/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/specs
Configured with: ../gcc-3.0.3/configure --prefix=/r
Thread model: single
gcc version 3.0.3
/r/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=3 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ Matrix.cc Matrix.ii
GNU CPP version 3.0.3 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/r/lib/gcc-lib/../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/r/lib/gcc-lib/../../include/g++-v3
/r/lib/gcc-lib/../../include/g++-v3/i686-pc-linux-gnu
/r/lib/gcc-lib/../../include/g++-v3/backward
/usr/local/include
/r/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/include
/usr/include
End of search list.
/r/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/cc1plus -fpreprocessed Matrix.ii -quiet -dumpbase Matrix.cc -O3 -version -o Matrix.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.1.
/r/lib/gcc-lib/../../include/g++-v3/bits/locale_facets.tcc: In function `void
_GLOBAL__I__Z3fooR6MatrixIiE()':
/r/lib/gcc-lib/../../include/g++-v3/bits/locale_facets.tcc:75: 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:
Compile the following file using -O3. The file is quite minimal already; removing more stuff from the class makes the compiler error disappear.
begin 644 Matrix.cc
M(VEN8VQU9&4@/&EO<W1R96%M/@H*=&5M<&QA=&4@/&-L87-S(%0^"F-L87-S
M($UA=')I>"!["G!U8FQI8SH*("!I;G0@<F]W<R@I(&-O;G-T.PH@(&9R:65N
M9"!V;VED(&9O;RA-871R:7@\:6YT/B`F;6%T<FEX*3L*("!F<FEE;F0@=F]I
M9"!B87(H8V]N<W0@36%T<FEX/&1O=6)L93X@)FUA=')I>"D["G!R:79A=&4Z
M"B`@<W1D.CIV96-T;W(\5#X@;5]D871A.PI].PH*=F]I9`IF;V\H36%T<FEX
M/&EN=#X@)FUA=')I>"D*>PH@(&UA=')I>"YM7V1A=&$N<'5S:%]B86-K*#`I
M.PI]"@IV;VED"F)A<BAC;VYS="!-871R:7@\9&]U8FQE/B`F;6%T<FEX*0I[
M"B`@;6%T<FEX+G)O=W,H*3L*("!S=&0Z.F-O=70@/#P@*&-H87(I<VEZ96]F
,*&1O=6)L92D["GT*
`
end
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: