I have found an ICE

Magnus Fromreide magfr@lysator.liu.se
Wed Dec 27 21:33:00 GMT 2000


I have configured the compiler as follows:

../gcc/configure --prefix=/usr/local/src/gnu/gcc-2.97/install
--enable-languages=c,c++ --enable-version-specific-runtime-libs
--disable-nls

and have found the following oddities:

make check results in

...
./mkcheck 0 `pwd` ../../../gcc/libstdc++-v3
running mkcheck
./mkcheck: testing the build directory
You need bash 2.x to run mkcheck.  Exiting.

How do I specify the path to bash 2.x? I do have one installed.

Compiling the attached file results in the following errors:

% /usr/local/src/gnu/gcc-2.97/install/bin/g++ -DHAVE_CONFIG_H -I. \
-I../2257-2 -I. -Wall -ansi -posix -pedantic -W -O3 -v \
-ftemplate-depth-23 -c ../2257-2/test.C
Reading specs from
/usr/local/src/gnu/gcc-2.97/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/specs
Configured with: ../gcc/configure
--prefix=/usr/local/src/gnu/gcc-2.97/install --enable-languages=c,c++
--enable-version-specific-runtime-libs --disable-nls
gcc version 2.97 20001227 (experimental)

/usr/local/src/gnu/gcc-2.97/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/cc1plus
-v -I. -I../2257-2 -I. -D__GNUC__=2 -D__GNUC_MINOR__=97
-D__GNUC_PATCHLEVEL__=0 -D__ELF__ -D__unix__ -D__linux__ -D__unix
-D__linux -Asystem=posix -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -Wall -W
-pedantic -Acpu=i386 -Amachine=i386 -D__i386 -D__i386__ -D__tune_i586__
-D__tune_pentium__ -D_POSIX_SOURCE -DHAVE_CONFIG_H -MD .deps/test.pp
../2257-2/test.C -D__GNUG__=2 -D__GXX_ABI_VERSION=100 -D__STRICT_ANSI__
-trigraphs -$ -quiet -dumpbase test.C -ansi -O3 -Wall -W -pedantic -ansi
-version -fnew-abi -ftemplate-depth-23 -o /tmp/ccMXEkFo.s
GNU CPP version 2.97 20001227 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 2.97 20001227 (experimental) (i586-pc-linux-gnu) compiled
by GNU C version 2.97 20001227 (experimental).
ignoring duplicate directory "."
ignoring duplicate directory
"/usr/local/src/gnu/gcc-2.97/install/i586-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 ../2257-2
 /usr/local/src/gnu/gcc-2.97/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/include/g++
 /usr/local/src/gnu/gcc-2.97/install/i586-pc-linux-gnu/include/
 /usr/local/include
 /usr/local/src/gnu/gcc-2.97/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/include
 /usr/include
End of search list.
In file included from
/usr/local/src/gnu/gcc-2.97/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/include/g++/cstdlib:2,
                 from ../2257-2/test.C:1:
/usr/local/src/gnu/gcc-2.97/install/lib/gcc-lib/i586-pc-linux-gnu/2.97/include/g++/bits/std_cstdlib.h:39:28:
bits/c++config.h: No such file or directory
../2257-2/test.C: In function `void fun()':
../2257-2/test.C:102: Internal error: Segmentation fault.
Please submit a full bug report.
 See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

The compiler do install bits/c++config.h as
/usr/local/src/gnu/gcc-2.97/install/i586-pc-linux-gnu/include/g++/bits/c++config.h
but for some reason is that not on the search path.

The internal error seems to originate in the method body being optimized
away from the tree, why this happens is currently beyond me. With -O2 it
compiles.

Magnus Fromreide					+46-13 17 68 48
MÃ¥rdtorpsgatan 21, 2tr					magfr@lysator.liu.se
S-584 34  LINKÖPING


More information about the Gcc mailing list