The following code generates no output in GCC 3.3, and correct output for 3.2.3 --- Begin Sample Code --------------------- template <typename X> class Foo { int i; public: Foo() { #ifdef KILL_GCC_3_3 X::explode(); #endif } }; class Bar { Foo<int> foo_; public: Bar() {} }; template class Foo<int>; --- End Sample Code ----------------------- If compiled with -DKILL_GCC_3_3, instead of reporting the error buglet.cc: In constructor `Foo<X>::Foo() [with X = int]': buglet.cc:11: instantiated from here buglet.cc:5: `int' is not an aggregate type (which is what 3.2.1 does) it dies with buglet.cc: In constructor `Foo<X>::Foo() [with X = int]': buglet.cc:11: instantiated from here buglet.cc:5: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Verified on Linux and Mac OS X. linux% gcc -v Reading specs from /usr/local/gcc-3.3/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs Configured with: ../gcc-3.3/configure --prefix=/usr/local/gcc-3.3 --enable-languages=c,c++ Thread model: posix gcc version 3.3 osx% gcc -v Reading specs from /usr/local/gcc/lib/gcc-lib/powerpc-apple-darwin6.6/3.3/specs Configured with: ../gcc-3.3/configure --prefix /usr/local/gcc --enable-languages=c,c++ Thread model: single gcc version 3.3
Created attachment 4198 [details] Test case
BTW, GCC 3.3 does produce correct output if the program is compiled with either -fno-implicit-templates -fno-exceptions The ICE on erroneous code remains, however, so perhaps that is a separate issue?
I am split this bug up into bug 11149 and bug 11150 both are regressions.
I am closing this bug as one of the ones that was split from this is already fixed.