[Bug c++/11247] -frepo fails to instantiate typeinfo
bgreen at nas dot nasa dot gov
gcc-bugzilla@gcc.gnu.org
Tue Sep 2 20:14:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11247
------- Additional Comments From bgreen at nas dot nasa dot gov 2003-09-02 20:14 -------
I have uncovered what appears to be the cause for this bug. I hope this is
helpful in some way.
When the compiler processes the dynamic_cast, the repo code emits the following
into the .rpo file:
O _ZTV5ITypeIiE
running c++filt on this shows that this refers to the class's vtable:
O vtable for IType<int>
However, the linker (run via collect2) produces an error indicating a missing
'typeinfo', but not a missing 'vtable':
GNU ld version 2.14 20030612
test.o(.text+0x32): In function `main':
/home/bgreen/code/tests/comcasts/tex3/test.C:23: undefined reference to
`typeinfo for IType<int>'
collect2 is then unable to match the unresolved typeinfo to the uninstantiated
vtable.
It seems that the problem boils down to the compiler repo code emitting a
'vtable' where it should emit a 'typeinfo' in response to a dynamic cast.
More information about the Gcc-bugs
mailing list