> This test case is valid, and the results observed are in incorrect; in > other words, yes, there is a bug.
Thanks for confirming. > In general, comparison of type_info objects is supposed to be done by > checking for address equality of the type info strings. On systems > without weak symbols, we use strcmp. (Look for > __GXX_MERGED_TYPEINFO_NAMES in <typeinfo>.) In the situation where we > use strcmp, I would expect to see this bug. In the situation where we > do not use strcmp, I would not expect to see that bug -- because I would > expect that the type_info objects and the corresponding type_info > strings are local symbols. If that is not the case, then that is the bug. data1 0x1 // Action record table data1 0x0 .align 8 data8.ua @gprel(DW.ref._ZTIZ3foovE1S#) .hidden DW.ref._ZTIZ3foovE1S .weak DW.ref._ZTIZ3foovE1S# .section .gnu.linkonce.s.DW.ref._ZTIZ3foovE1S,"aws",@progbits .align 8 .type DW.ref._ZTIZ3foovE1S#, @object .size DW.ref._ZTIZ3foovE1S#, 8 DW.ref._ZTIZ3foovE1S: data8 _ZTIZ3foovE1S# Found both in u.S and t.S and merged by the linker. -- Eric Botcazou