* [Bug c++/12076] gcov misreports coverage of return statement [NVR]
[not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
@ 2005-10-27 1:41 ` reddy at pixar dot com
2006-01-21 22:33 ` jbuck at welsh-buck dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: reddy at pixar dot com @ 2005-10-27 1:41 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12076] gcov misreports coverage of return statement [NVR]
[not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
2005-10-27 1:41 ` [Bug c++/12076] gcov misreports coverage of return statement [NVR] reddy at pixar dot com
@ 2006-01-21 22:33 ` jbuck at welsh-buck dot org
2007-05-04 1:34 ` [Bug c++/12076] gcov misreports coverage of return statement [NRV] pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: jbuck at welsh-buck dot org @ 2006-01-21 22:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jbuck at welsh-buck dot org 2006-01-21 22:33 -------
Subject: Re: gcov misreports coverage of return statement
[NVR]
On Thu, 2005-10-27 at 01:41 +0000, reddy at pixar dot com wrote:
>
> ------- 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?
The -fno-elide-constructors flag helps; it forces explicit copy constructor
calls, and that seems to get rid of most of the bogons -- but apparently
not all of them -- I'll look further, but I think sometimes the
initializer for a base class gets optimized in a way that results in a
false ###### flagging. Still, if you're having this trouble, start with
that flag.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
[not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
2005-10-27 1:41 ` [Bug c++/12076] gcov misreports coverage of return statement [NVR] reddy at pixar dot com
2006-01-21 22:33 ` jbuck at welsh-buck dot org
@ 2007-05-04 1:34 ` pinskia at gcc dot gnu dot org
2007-05-06 14:32 ` hubicka at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-04 1:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pinskia at gcc dot gnu dot org 2007-05-04 02:34 -------
*** Bug 31810 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |echristo at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
[not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2007-05-04 1:34 ` [Bug c++/12076] gcov misreports coverage of return statement [NRV] pinskia at gcc dot gnu dot org
@ 2007-05-06 14:32 ` hubicka at gcc dot gnu dot org
2007-05-06 23:32 ` jbuck at gcc dot gnu dot org
2010-01-08 17:46 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-05-06 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from hubicka at gcc dot gnu dot org 2007-05-06 15:31 -------
The problem with NRV transformation is that it removes the return statement
from default path and keeps it in the catch path making GCOV to properly output
it as unexecuted. I tried to look into the NRV modify_expr withing return_expr
but it is not the place to find the proper locator, looks like NRV itself needs
to be updated.
Honza
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
[not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2007-05-06 14:32 ` hubicka at gcc dot gnu dot org
@ 2007-05-06 23:32 ` jbuck at gcc dot gnu dot org
2010-01-08 17:46 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2007-05-06 23:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from jbuck at gcc dot gnu dot org 2007-05-07 00:32 -------
The return statement, before the optimization, does two things; it causes a
copy constructor call, and it causes the function to return. NVR eliminates
the copy constructor call, but the statement still returns. At -O0, don't we
still hit a distinct return statement for the code at the given source line?
The fact that there is also unexecuted code present that executes only if
exceptions are caught should not matter, because we mark a statement as covered
if any part of it executes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
[not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2007-05-06 23:32 ` jbuck at gcc dot gnu dot org
@ 2010-01-08 17:46 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-01-08 17:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from pinskia at gcc dot gnu dot org 2010-01-08 17:46 -------
*** Bug 42660 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076
^ permalink raw reply [flat|nested] 10+ messages in thread