// compile this with -O3 to get segfault on 4.0.3, // note the "warning: inline function 'A::~A()' used but never defined". // 3.3 and 4.1 accept this code without warning. // This bug was originally reported by Alexey Maximov <amax@mail.ru> struct A; template<class T> struct P { P() : p(0) { } ~P(); T *p; }; template<class T> P<T>::~P() { delete p; } struct Q : private P<A> { }; struct V { virtual ~V(); }; #pragma interface struct A { V d; Q p; }; struct T { T (); Q q; }; T::T () { }
This is a dup of bug 24248 which in turn is a dup of bug 22252. *** This bug has been marked as a duplicate of 22252 ***