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.
Comment #1 by r.sagitario — 2013-09-21T04:33:22Z
Comment #2 by k.hara.pg — 2013-09-21T09:52:11Z
Comment #3 by github-bugzilla — 2013-09-22T11:47:58Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e1ed2905b2b7e996a4154d079fd8a8660424b5af fix Issue 11081 - Win64: duplicate COMDAT with failed compilation with lambdas https://github.com/D-Programming-Language/dmd/commit/4981236072fc4625b959d9146d073e808436f334 Merge pull request #2579 from 9rnsr/fix11081 [REG2.064a] Issue 11081 - Win64: duplicate COMDAT with failed compilation with lambdas