I was compiling LLVM and Clang when I ran into this ICE. I found the failing
compile job and ran it again with -E to produce buggycppfile.cpp which fails to
compile. I then did the following as instructed in the bug reporting
instructions:
[...@knuckles CodeGen]$ g++ buggycppfile.cpp -o buggycppfile.o -save-temps -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3)
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/cc1plus -E -quiet -v -D_GNU_SOURCE
buggycppfile.cpp -mtune=generic -fpch-preprocess -o buggycppfile.ii
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../../x86_64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.2
/usr/include/c++/4.2/x86_64-linux-gnu
/usr/include/c++/4.2/backward
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/include
/usr/include
End of search list.
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/cc1plus -fpreprocessed buggycppfile.ii
-quiet -dumpbase buggycppfile.cpp -mtune=generic -auxbase buggycppfile -version
-fstack-protector -fstack-protector -o buggycppfile.s
GNU C++ version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) (x86_64-linux-gnu)
compiled by GNU C version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 2328a9860f8ee3842b3eeb9e852e4412
In file included from CGBuilder.h:15,
from CGBlocks.h:31,
from CodeGenFunction.h:27,
from CGBlocks.cpp:16:
/home/rnk/llvm-globals/include/llvm/Support/IRBuilder.h: In member function
'llvm::Value* llvm::IRBuilder<preserveNames, T>::CreateGlobalString(const
char*, const char*)':
/home/rnk/llvm-globals/include/llvm/Support/IRBuilder.h:412: internal compiler
error: in stabilize_expr, at cp/tree.c:2273
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.
--
Summary: ICE while building clang
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reid dot kleckner at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40694