------- Comment #4 from jwakely dot gcc at gmail dot com 2009-08-07 12:42 ------- Ah, [class.virtual] paragraph 5 says: If the return type of D::f differs from the return type of B::f, the class type in the return type of D::f shall be complete at the point of declaration of D::f or shall be the class type D.
The class Bart is not complete at the point of declaration of Bart::InnerBart::getOuter(), which might explain why the pointer adjustment does not happen. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40997