------- Comment #5 from jwakely dot gcc at gmail dot com 2009-08-07 12:47 ------- Moving the definition of InnerBart outside the body of Bart (which requires making Bart::createInner non-covariant) allows the assertion to pass, the addresses are all correct. So I believe this program is invalid.
I think GCC hould have rejected the code, so this is a missing diagnostic, but not wrong-code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40997