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...
--
Summary: internal compiler error: in c_expand_expr, at c-
common.c:4138
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mki at maconomy dot dk
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: hppa2.0w-hp-hpux11.11
GCC host triplet: hppa2.0w-hp-hpux11.11
GCC target triplet: hppa2.0w-hp-hpux11.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23162