[Issue 5848] New: Coverage always report 0000000 for inlined function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 16 11:43:01 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5848
Summary: Coverage always report 0000000 for inlined function
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: kennytm at gmail.com
--- Comment #0 from kennytm at gmail.com 2011-04-16 11:39:31 PDT ---
When a function is inlined, the coverage result will not consider it was
called, and always report the coverage count as 0000000.
For example, the program:
int inlined(int p, int q) {
return p+q;
}
void main() {
inlined(1, 3);
}
without -inline, the coverage result is
|int inlined(int p, int q) {
1| return p+q;
|}
|void main() {
1| inlined(1, 3);
|}
x.d is 100% covered
with -inline, the 'inlined' function becomes uncovered
|int inlined(int p, int q) {
0000000| return p+q;
|}
|void main() {
1| inlined(1, 3);
|}
x.d is 50% covered
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list