[Issue 15032] [REG2.068.1] coverage output is discreted around the calls to map(), canFind(), filter()

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Sep 9 14:47:36 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=15032

Martin Nowak <code at dawg.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Martin Nowak <code at dawg.eu> ---
The _Dmain functions ends up in the wrong object file (mod_a.o) b/c it's
codegen is triggered from the nested find function.
https://github.com/D-Programming-Language/dmd/blob/ea5d85af7abf0b1e36fd42a8d98fd692a765dea0/src/glue.c#L900

Therefor code for _Dmain is generated before the module's coverage symbol is
setup
(https://github.com/D-Programming-Language/dmd/blob/ea5d85af7abf0b1e36fd42a8d98fd692a765dea0/src/glue.c#L370)
and incUsageElem will silently be skipped
(https://github.com/D-Programming-Language/dmd/blob/ea5d85af7abf0b1e36fd42a8d98fd692a765dea0/src/toir.c#L62).

This order related bug is also fixed by
https://github.com/D-Programming-Language/dmd/pull/5058 which tries to emit
nested functions after their parent function.

--


More information about the Digitalmars-d-bugs mailing list