following code invokes ICE. svn revision 128768 class Ifoo { public: virtual ~Ifoo(){} }; class foo:public Ifoo { foo(){}; // ~foo(); }; foo::~foo() { delete this; }
1. if you uncomment ~foo in class definition, ICE go away. 2. if you comment functiono body of foo::~foo, it invokes error. error: definition of implicitly-declared 'virtual foo::~foo()' -- Summary: [4.3 Regression] internal compiler error: in finish_function, at cp/decl.c:11638 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jojelino at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33556