This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/5337: gcc-3.0.3 gives internal error


rodrigc@gcc.gnu.org writes:

Btw, should I reply to all these addresses which were in the reply-to
field of your mail?

> I cannot reproduce this problem with gcc 3.0.3: Could you perhaps
> build your version of gcc 3.0.3 with a compiler other than gcc
> 3.0.1?

I tried different optimization flags, and "-finline-functions" seems
to trigger the bug.

I tried compiling gcc 3.0.3 with older compilers, and the bug happened
on both of the following cases:

  1) gcc 3.0.3 compiled with gcc 2.95.2 on mips-sgi-irix6.5
  2) gcc 3.0.3 compiled with egcs-2.91.66 on i686-pc-linux

Here are the corresponding outputs:

1) g++ -v -save-temps -finline-functions -c Matrix.cc
Reading specs from /tmp/thirsima/lib/gcc-lib/mips-sgi-irix6.5/3.0.3/specs
Configured with: /share/r_src/gcc/gcc-3.0.3/configure --prefix=/tmp/thirsima
Thread model: single
gcc version 3.0.3
 /tmp/thirsima/lib/gcc-lib/mips-sgi-irix6.5/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 -Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix__ -D__mips__ -D__sgi__ -D__host_mips__ -D__MIPSEB__ -D_MIPSEB -D__SYSTYPE_SVR4__ -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix -D__mips -D__sgi -D__host_mips -D__MIPSEB -D__SYSTYPE_SVR4 -Asystem=unix -Asystem=svr4 -Acpu=mips -Amachine=sgi -D__CHAR_UNSIGNED__ -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int -D__EXTENSIONS__ -D_SGI_SOURCE -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS3 -D_ABIN32=2 -D_MIPS_SIM=_ABIN32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -D_COMPILER_VERSION=601 -U__mips -D__mips=3 -D__mips64 Matrix.cc Matrix.ii
GNU CPP version 3.0.3 (cpplib) [AL 1.1, MM 40] SGI running IRIX 6.x
ignoring nonexistent directory "/tmp/thirsima/mips-sgi-irix6.5/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/thirsima/include/g++-v3
 /tmp/thirsima/include/g++-v3/mips-sgi-irix6.5
 /tmp/thirsima/include/g++-v3/backward
 /usr/local/include
 /tmp/thirsima/lib/gcc-lib/mips-sgi-irix6.5/3.0.3/include
 /usr/include
End of search list.
 /tmp/thirsima/lib/gcc-lib/mips-sgi-irix6.5/3.0.3/cc1plus -fpreprocessed Matrix.ii -quiet -dumpbase Matrix.cc -version -finline-functions -o Matrix.s
GNU CPP version 3.0.3 (cpplib) [AL 1.1, MM 40] SGI running IRIX 6.x
GNU C++ version 3.0.3 (mips-sgi-irix6.5)
        compiled by GNU C version 2.95.2 19991024 (release).
/tmp/thirsima/include/g++-v3/bits/stl_alloc.h: In static member function 
   `static char* std::__default_alloc_template<threads, 
   inst>::_S_chunk_alloc(unsigned int, int&) [with bool threads = true, int 
   inst = 0]':
/tmp/thirsima/include/g++-v3/bits/stl_alloc.h:460: 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.

======================================================================

2) g++ -v -save-temps -finline-functions -c Matrix.cc
Reading specs from /tmp/thirsima/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/specs
Configured with: /share/r_src/gcc/gcc-3.0.3/configure --prefix=/tmp/thirsima
Thread model: single
gcc version 3.0.3
 /tmp/thirsima/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__NO_INLINE__ -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 "/tmp/thirsima/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/thirsima/include/g++-v3
 /tmp/thirsima/include/g++-v3/i686-pc-linux-gnu
 /tmp/thirsima/include/g++-v3/backward
 /usr/local/include
 /tmp/thirsima/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/include
 /usr/include
End of search list.
 /tmp/thirsima/lib/gcc-lib/i686-pc-linux-gnu/3.0.3/cc1plus -fpreprocessed Matrix.ii -quiet -dumpbase Matrix.cc -version -finline-functions -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 egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
/tmp/thirsima/include/g++-v3/bits/basic_string.tcc: In member function `_CharT* 
   std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_clone(const _Alloc&, 
   typename _Alloc::size_type) [with _CharT = char, _Traits = 
   std::char_traits<char>, _Alloc = std::allocator<char>]':
/tmp/thirsima/include/g++-v3/bits/basic_string.tcc:404: 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.

======================================================================

I also tried to compile Matrix.cc on my friend's machine with gcc
3.0.2 (Red Hat 7.1 on i386-redhat-linux), and it worked ok:

$ g++3 -v -save-temps -finline-functions -c Matrix.cc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/u
sr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i
386-redhat-linux
Thread model: posix
gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)
 /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DE
PRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__
=0 -D__GNUC_PATCHLEVEL__=2 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__lin
ux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GN
U_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ Ma
trix.cc Matrix.ii
GNU CPP version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3) (cpplib) (i386 Linux/
ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/g++-v3
 /usr/include/g++-v3/i386-redhat-linux
 /usr/include/g++-v3/backward
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/cc1plus -fpreprocessed Matrix.ii -quie
t -dumpbase Matrix.cc -version -finline-functions -o Matrix.s
GNU CPP version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3) (cpplib) (i386 Linux/
ELF)
GNU C++ version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3) (i386-redhat-linux)
        compiled by GNU C version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3).
 as --traditional-format -V -Qy -o Matrix.o Matrix.s
GNU assembler version 2.11.90.0.8 (i386-redhat-linux) using BFD version 2.11.90.
0.8

-- 
Teemu Hirsimäki

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]