[Issue 5848] Coverage always report 0000000 for inlined function

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5848

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P3

--


[Issue 5848] Coverage always report 0000000 for inlined function

2012-04-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848


SomeDude lovelyd...@mailmetrash.com changed:

   What|Removed |Added

 CC||lovelyd...@mailmetrash.com


--- Comment #5 from SomeDude lovelyd...@mailmetrash.com 2012-04-23 09:09:59 
PDT ---
With dmd 2.059:

PS E:\DigitalMars\dmd2\samples rdmd -cov bug
PS E:\DigitalMars\dmd2\samples cat bug.lst
   |//import std.stdio, std.range, std.algorithm, std.string;
   |
   |import std.stdio;
   |
   |int inlined(int p, int q) {
  1|return p+q;
   |}
   |void main() {
  1|inlined(1, 3);
   |}
bug.d is 100% covered
PS E:\DigitalMars\dmd2\samples

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5848] Coverage always report 0000000 for inlined function

2012-04-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848



--- Comment #6 from kenn...@gmail.com 2012-04-23 09:44:00 PDT ---
(In reply to comment #5)
 With dmd 2.059:
 
 PS E:\DigitalMars\dmd2\samples rdmd -cov bug
 PS E:\DigitalMars\dmd2\samples cat bug.lst
|//import std.stdio, std.range, std.algorithm, std.string;
|
|import std.stdio;
|
|int inlined(int p, int q) {
   1|return p+q;
|}
|void main() {
   1|inlined(1, 3);
|}
 bug.d is 100% covered
 PS E:\DigitalMars\dmd2\samples

Please make sure you have the '-inline' flag. Test with 'dmd', not 'rdmd'.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5848] Coverage always report 0000000 for inlined function

2012-04-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848



--- Comment #7 from SomeDude lovelyd...@mailmetrash.com 2012-04-23 12:29:55 
PDT ---
(In reply to comment #6)
 (In reply to comment #5)
 Please make sure you have the '-inline' flag. Test with 'dmd', not 'rdmd'.

OK, with -inline I get the same result you got.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5848] Coverage always report 0000000 for inlined function

2011-04-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848



--- Comment #4 from kenn...@gmail.com 2011-04-17 00:50:20 PDT ---
(In reply to comment #3)
 (In reply to comment #2)
  (In reply to comment #1)
   What kind of textual output do you desire in this situation?
  
  What do you mean?
 
 What coverage results textual file do you want DMD to save on disk about that
 inlined() function when you compile the program with the -inline switch too?

Ideally that line should display 1, like the 2nd piece of code I've shown in
the first post. The coverage percent should be 100%, not 50%. Why would one
expect to get 000 when a line of code is used?

If it's not possible to get an exact count, at least it should show something
other than 000, and count that line as covered.

In gcov the equivalent program shows '1' in the corresponding line even with
maximum optimization (-O3). So avoiding 000 in most of the cases should be
possible.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5848] Coverage always report 0000000 for inlined function

2011-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848


bearophile_h...@eml.cc changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc


--- Comment #1 from bearophile_h...@eml.cc 2011-04-16 11:50:22 PDT ---
What kind of textual output do you desire in this situation?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5848] Coverage always report 0000000 for inlined function

2011-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848



--- Comment #2 from kenn...@gmail.com 2011-04-16 12:06:15 PDT ---
(In reply to comment #1)
 What kind of textual output do you desire in this situation?

What do you mean?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 5848] Coverage always report 0000000 for inlined function

2011-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5848



--- Comment #3 from bearophile_h...@eml.cc 2011-04-16 12:54:22 PDT ---
(In reply to comment #2)
 (In reply to comment #1)
  What kind of textual output do you desire in this situation?
 
 What do you mean?

What coverage results textual file do you want DMD to save on disk about that
inlined() function when you compile the program with the -inline switch too?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---