[Issue 15324] symbol is already defined
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Nov 13 09:18:47 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15324
Johannes Pfau <johannespfau at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |johannespfau at gmail.com
--- Comment #1 from Johannes Pfau <johannespfau at gmail.com> ---
Created attachment 1567
--> https://issues.dlang.org/attachment.cgi?id=1567&action=edit
reduced test case
I've added a dustmite reduced test case. Compile like this:
dmd main.d
/usr/bin/ld: Warning: size of symbol
`_D4main179__T19MultiIndexContainerTC4core6thread6ThreadTS4main113__T9IndexedByS964main89__T6HashedVbi0VAyaa1_61VAyaa21_7479706569642861292e6765744861736828266129VAyaa4_613d3d62ZZ9IndexedByZ19MultiIndexContainer9__mixin108containsMxFC4core6thread6ThreadZb'
changed from 111 in main.o to 103 in main.o
gdc main.d
/tmp/cczTwcpO.s: Assembler messages:
/tmp/cczTwcpO.s:195: Error: symbol
`_D4main179__T19MultiIndexContainerTC4core6thread6ThreadTS4main113__T9IndexedByS964main89__T6HashedVbi0VAyaa1_61VAyaa21_7479706569642861292e6765744861736828266129VAyaa4_613d3d62ZZ9IndexedByZ19MultiIndexContainer9__mixin108containsMxFC4core6thread6ThreadZb'
is already defined
It seems scary that the size of the symbol changes. But maybe the bigger issue
is that the template is actually emitted twice to the same object file. This
seems to be tolerated by ld (dmd only gets a warning) but not by the assembler
(gdc outputs asm and calls the assembler which refuses to assemble this).
Pinging Iain as I'm not sure if the assembler only complains because the size
differs or whether it will still complain even if the size difference is fixed.
--
More information about the Digitalmars-d-bugs
mailing list