[Bug d/92216] New: GDC generate duplicate symbols when mixins and interfaces are used to gather
kozzi11 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 24 20:57:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92216
Bug ID: 92216
Summary: GDC generate duplicate symbols when mixins and
interfaces are used to gather
Product: gcc
Version: 9.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: kozzi11 at gmail dot com
Target Milestone: ---
Created attachment 47109
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47109&action=edit
Zip archive with b.d and c.d files
There seems to be an issue with generating object symbols for mixins. In some
cases gdc generate same symbols (not weak) in object files so there is a
collision when linking.
Trying to build gtkd package is one of examples. I have write small example to
mitigate this issue. It is add as an attachment.
$ gdc -c -o b.o b.d
$ gdc -c -o c.o c.d
$ gdc -o test.o b.o c.o
ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv':
c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv';
b.o:b.d:(.text+0x38): first defined here
I have try this with gcc 9.2 (gdc (GCC) 9.2.0)
And with git gcc(gdc) 10 (from august)
same issue for both versions
More information about the Gcc-bugs
mailing list