[Issue 13742] undefined reference to __coverage

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Feb 2 04:19:56 PST 2016


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

Sönke Ludwig <sludwig at outerproduct.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sludwig at outerproduct.org

--- Comment #4 from Sönke Ludwig <sludwig at outerproduct.org> ---
For completeness sake, this is what I reduced from vibe.d:

foo.d
---
import bar;
void clear() {
  void foo() {}
  performLocked!(() => foo);
}
---

bar.d
---
import core.thread;
void performLocked(alias PROC)() { assert(false); }
---

main.d
---
import foo;
void main() {}
---

dmd -lib -oflib.a bar.d foo.d -cov
dmd -oftest lib.a main.d -cov
-> lib.a(foo.o):foo.d:function
_D3bar50__T13performLockedS28_D3foo5clearFZ9__lambda2MFZvZ13performLockedMFNaNbNiNfZv:
error: undefined reference to '__coverage'

--


More information about the Digitalmars-d-bugs mailing list