In this test case, I cast a Derived* to a Base* after the destructor for the Derived part has run. It's a strange thing to do, but I think the cast should succeed, because it does not need instance information.
It only seems to happen when using virtual inheritance. We noticed this in libsigc++. -- Summary: static Derived-to-Base cast fails when ~Derived has run. Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: murrayc at murrayc dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21279