Comment #0 by Jesse.K.Phillips+D — 2016-11-15T02:33:33Z
This code results in the following MS linker message:
test.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '_D4test8__T1STwZ1S1fMFNaNbNiNfwZv'
Error: linker exited with status 43694744
------------------
void main() {
S!dchar a4;
}
struct S(T)
{
void f(T value)
{
}
void f(dchar c)
{
}
}
-------------------------
Obviously when the template is generated f(T)() is f(dchar), optlink doesn't complain but I don't know what is correct.
Possibly similar:
https://issues.dlang.org/show_bug.cgi?id=11081https://issues.dlang.org/show_bug.cgi?id=14541
Comment #1 by bugzilla — 2017-10-24T22:34:50Z
Optlink doesn't complain because when there are multiple COMDATs with the same name, the linker just picks one.
Comment #2 by bugzilla — 2017-10-24T22:40:33Z
*** Issue 17332 has been marked as a duplicate of this issue. ***