This is a copy of an issue originally filed as gdb bug at http://sourceware.org/bugzilla/show_bug.cgi?id=11639 that was identified as a gcc issue in the mean time:
If 'Derived' and 'Base' are setup as shown in the attachment void Derived::foo() { Base *b = this; Base &br = *b; } then 'print b' yields "$1 = (void *) 0xbfffee38", i.e. the type information for 'b' is completely lost. It should print (Base *) 0xbfffee38. The problem is not present in g++ 4.4. -- Summary: Base class type information not accessible in binaries compiled with g++ 4.5.0 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: andre dot poenitz at nokia dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45334