[Bug gcov/profile/24550] New: [4.x Regression] incorrect gcov code coverage output in 4.0 and 4.1

2005-10-26 Thread reddy at pixar dot com
e tried this with other stl
container classes as well as other non-stl classes). For example, in the case
of coverage being produced beyond the end of the file for gcov 4.x, if I supply
the -b argument to gcov I get this at the end:

1:   22:}
function _GLOBAL__I_globalVar called 1 returned 100% blocks executed 100%
1:   23:/*EOF*/
call0 returned 100%
function _GLOBAL__D_globalVar called 0 returned 0% blocks executed 0%
#:   24:/*EOF*/
call0 never executed

Also, in the test case above, if I change the return value of doSomething() to
be an int instead of a std::string then the problem does not occur.

As another interesting datapoint, the above information is for running on a
Fedora Core 2 machine, but I get similar behavior using Apple's 4.0.0 compiler
that they ship with OSX 10.4 (Tiger) - However, in that case the /*EOF*/
coverage error on line 24 doe not occur. Only the one on line 14 occurs.
Perhaps that helps to isolate some part of this problem.

Please let me know if there is any more information that I can provide you to
help reproduce this problem. We are actively using gcov to quantify the code
coverage of our automated tests, so we'd love to see this problem get fixed and
I'm happy to help out as much as I can.

Cheers,

Martin.


-- 
   Summary: [4.x Regression] incorrect gcov code coverage output in
4.0 and 4.1
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: major
  Priority: P2
     Component: gcov/profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reddy at pixar dot com
 GCC build triplet: x86_64-redhat-linux-gnu
  GCC host triplet: x86_64-redhat-linux-gnu
GCC target triplet: x86_64-redhat-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24550



[Bug c++/24550] incorrect gcov code coverage output in 4.0 and 4.1

2005-10-26 Thread reddy at pixar dot com


--- Comment #4 from reddy at pixar dot com  2005-10-27 01:36 ---
Thanks for the bugdb digging Andrew. I did do some searching to see if these
problems were reported, but didn't catch those reports. Sorry 'bout that.

PR 12076 does sound like a dupe, and the alternate behavior just suggested by
Joe would be just fine.

Looks like the last word on PR 15369 was that there was a workaround for the
case submitted there about adding breakpoints within a debugger, though in this
case there is no workaround - the code coverage values will be incorrect.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24550



[Bug c++/12076] gcov misreports coverage of return statement [NVR]

2005-10-26 Thread reddy at pixar dot com


--- Comment #12 from reddy at pixar dot com  2005-10-27 01:41 ---
Having code coverage emit a "-" instead of "#" in this case sounds
appropriate and would certainly solve the problem for me.

Is there a way to workaround this issue by reorganizing code, or something
else, so that I can fool the NVR smarts into not getting invoked in this
particular case?


-- 

reddy at pixar dot com changed:

   What|Removed |Added

 CC|            |reddy at pixar dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076