Compiling a 1.5 Mb ii gave an ICE. It has been reduced as much as I could, giving the following case: -bash-3.00$ cat d.cpp namespace std { template<typename _Tp1> struct auto_ptr_ref { }; template<typename _Tp> class auto_ptr { public: auto_ptr(auto_ptr& __a) {} auto_ptr(auto_ptr_ref<_Tp> __ref) {} auto_ptr& operator=(auto_ptr_ref<_Tp> __ref) {} template<typename _Tp1> operator auto_ptr_ref<_Tp1>() {} template<typename _Tp1> operator auto_ptr<_Tp1>() {} }; } class C { virtual std::auto_ptr<int> foo() const; }; class D : virtual C { ~D(); virtual std::auto_ptr<int> foo() const { } }; D::~D() {} -bash-3.00$ /usr/local/gcc-3.4.4/bin/g++ -v --save-temp d.cpp Reading specs from /usr/local/gcc-3.4.4/lib/gcc/hppa2.0w-hp-hpux11.11/3.4.4/specs Configured with: /data/develop/src/gcc-3.4.4/configure --enable-languages=c,c++ --with-gnu-as --without-gnu-ld --with-as=/usr/local/binutils-2.16/bin/as --prefix=/usr/local/gcc-3.4.4 Thread model: single gcc version 3.4.4 /usr/local/gcc-3.4.4/libexec/gcc/hppa2.0w-hp-hpux11.11/3.4.4/cc1plus -E -quiet -v d.cpp -o d.ii ignoring nonexistent directory "/usr/local/gcc-3.4.4/hppa2.0w-hp-hpux11.11/include" #include "..." search starts here: #include <...> search starts here: /usr/local/gcc-3.4.4/include/c++/3.4.4 /usr/local/gcc-3.4.4/include/c++/3.4.4/hppa2.0w-hp-hpux11.11 /usr/local/gcc-3.4.4/include/c++/3.4.4/backward /usr/local/include /usr/local/gcc-3.4.4/include /usr/local/gcc-3.4.4/lib/gcc/hppa2.0w-hp-hpux11.11/3.4.4/include /usr/include End of search list. /usr/local/gcc-3.4.4/libexec/gcc/hppa2.0w-hp-hpux11.11/3.4.4/cc1plus -fpreprocessed d.ii -quiet -dumpbase d.cpp -auxbase d -version -o d.s GNU C++ version 3.4.4 (hppa2.0w-hp-hpux11.11) compiled by GNU C version 3.4.4. GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=130816 d.cpp: In member function `std::auto_ptr<int> D::_ZTv0_n12_NK1D3fooEv() const': d.cpp:30: internal compiler error: in c_expand_expr, at c-common.c:4138 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -bash-3.00$ Same ICE with 3.4.3. 3.3.6 as well as 4.0.1 complains (probably correctly) that the reduced code isn't valid. Upgrading to 4.0.1 isn't possible at the moment bco other ICEs, so I hope to find a 3.x.x solution...
Confirmed, this is really fixed on 4.0.0 and above. I don't know if this is going to be fixed on the 3.4 branch as it was fixed for 4.0 by the merge of the tree-ssa which is too big to merge into the 3.4 branch.
We have an aggr_init_expr here.
Forgot to mention: The ICE seems to be platform specific. My testcase works on linux with 3.3.4, 3.4.3 and 4.0.1. It thus (to me) seems slightly related to PR c++/21123... (But --disable-checking makes no difference.)
The testcase fails on all 3.4 releases on hppa-unknown-linux-gnu (i.e., the failure isn't specific to hpux). --disable-checking has no effect in this case as the ICE is generated by calling abort.
Postponed until GCC 3.4.6
Unlikely to be fixed in 3.4.6