Bug 11081 – Win64: duplicate COMDAT with failed compilation with lambdas
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-21T02:52:00Z
Last change time
2015-06-09T05:14:47Z
Keywords
link-failure, pull
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0 by r.sagitario — 2013-09-21T02:52:59Z
With current git-HEAD, this code snippet extracted from the std.exception unittests:
T ifThrown2(E : Throwable, T)(T delegate(E) errorHandler)
{
return errorHandler();
}
unittest
{
static if (__traits(compiles, ifThrown2!Exception(e => 0)))
{
}
static if (__traits(compiles, ifThrown2!Exception(e => 0)))
{
}
}
compiled with "dmd -m64 -unittest -main" results in:
test.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT '_D4te
st15__unittestL32_5FZv17__T0TC9ExceptionZ0MFNaNbNfC9ExceptionZi'
This does not happen with dmd 2.063. The code actually does not compile, so it seems that broken code is emitted to the object file.