http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46304
Summary: g++ crashes with ICE in bitmap_first_set_bit, at bitmap.c:770 Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: apat...@apataki.net g++ 4.5.1 crashes with an internal compiler error on the following C++ code (trimmed down from a larger codebase - in this shortened state it is clearly not expected to work/do anything useful): #include <complex.h> template<class T> class ClassA { complex double *data; public: void setSize() { data[0] = 1.0 + 2.0i; } }; template<class TCoeff, class TRHS> class ClassB { ClassA<TCoeff> a1; ClassA<TRHS> a2; public: void setSize() { a1.setSize(); a2.setSize(); } }; class ClassC { ClassB<double, complex double> d; virtual void init(); }; void ClassC::init() { d.setSize(); } $ g++ -c z8.cc z8.cc: In member function ‘void ClassA<T>::setSize() [with T = __complex__ double]’: z8.cc:41:1: internal compiler error: in bitmap_first_set_bit, at bitmap.c:770 Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccL3ZMfZ.out file, please attach this to your bugreport. $ g++ -v Using built-in specs. COLLECT_GCC=/usr/bin/g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.5.1/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC) This is on a Fedora 14 x86-64 system.