Another ICE with long double, now with optimization only: $ cat aa.cc class DataEncoder { public: virtual void put_longdouble(long double) = 0; };
class DataOutputStream { public: virtual void write_longdouble(long double value) = 0; }; class DataOutputStream_impl : virtual public DataOutputStream { public: void write_longdouble(long double value); private: DataEncoder *ec; }; void DataOutputStream_impl::write_longdouble(long double value) { ec->put_longdouble(value); } $ g++ aa.cc -c -O2 aa.cc: In member function 'void DataOutputStream_impl::_ZTv0_n12_N21DataOutputStream_impl16write_longdoubleEe(long double)': aa.cc:21: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6336 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ g++ -v Using built-in specs. Target: hppa2.0w-hp-hpux11.11 Configured with: /mnt/toolsjunk/snapshot/src/sasrvb/toolsbox-3.5.1.6pre.20060924/buildroot/gcc/gcc-4.1.1/configure --enable-threads=posix --with-gnu-as --with-as=/tools/snapshot/toolsbox-3.5.1.6pre.20060924/hppa2.0w-hp-hpux11.11/hppa2.0w-hp-hpux11.11/bin/as --without-gnu-ld --with-local-prefix=/tools/snapshot/toolsbox-3.5.1.6pre.20060924/hppa2.0w-hp-hpux11.11 --disable-nls --enable-version-specific-runtime-libs --prefix=/tools/snapshot/toolsbox-3.5.1.6pre.20060924/hppa2.0w-hp-hpux11.11 Thread model: posix gcc version 4.1.1 $ -- Summary: ICE optimizing passing long double to abstract method while in other abstract's impl Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: michael dot haubenwallner at salomon dot at 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=29209