> Yes, that's wrong. I'd expect that to be a front-end bug, but if it > doesn't happen on all platforms, then, maybe it's not?
I think it can happen for all targets that use DW_EH_PE_indirect incoding. And it happens in Ada too because, like in C++, local exceptions are not expected to be visible outside the compilation (translation) unit so they are not uniquified. I think the bug is simply in dw2_force_const_mem. Here's a more verbose excerpt of the assembly files: .LLSDACSE2: data1 0x1 data1 0x0 .align 8 data8.ua @gprel(DW.ref._ZTIZ3foovE1S#) .LLSDATT2: [...] .section .rodata .align 8 .type _ZTIZ3foovE1S#, @object .size _ZTIZ3foovE1S#, 16 _ZTIZ3foovE1S: data8 _ZTVN10__cxxabiv117__class_type_infoE#+16 data8 _ZTSZ3foovE1S# .align 8 .type _ZTSZ3foovE1S#, @object .size _ZTSZ3foovE1S#, 10 _ZTSZ3foovE1S: stringz "Z3foovE1S" .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# Note that the type_info object itself (_ZTIZ3foovE1S) is local. What is not local is the indirect reference to it through DW.ref._ZTIZ3foovE1S. So, while the 2 DW.ref._ZTIZ3foovE1S symbols are advertised as being identical, their contents would *not* be identical at link-time. -- Eric Botcazou