public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-4@http.gcc.gnu.org/bugzilla/>
@ 2012-04-27 13:38 ` darkraver at gmail dot com
  2012-08-20 22:51 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: darkraver at gmail dot com @ 2012-04-27 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

Paul Robinson <darkraver at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darkraver at gmail dot com

--- Comment #18 from Paul Robinson <darkraver at gmail dot com> 2012-04-27 13:37:30 UTC ---
Is this ever going to be looked at? It makes most gcov output incorrect and
hence not useful.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-4@http.gcc.gnu.org/bugzilla/>
  2012-04-27 13:38 ` [Bug c++/12076] gcov misreports coverage of return statement [NRV] darkraver at gmail dot com
@ 2012-08-20 22:51 ` paolo.carlini at oracle dot com
  2023-01-31  3:31 ` pinskia at gcc dot gnu.org
  2023-07-05 16:00 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-08-20 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org |jason at gcc dot gnu.org

--- Comment #19 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-20 22:49:26 UTC ---
I understand this is still an issue. Let's add Jason in CC, IIRC he contributed
the NRV optimization on trees.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-4@http.gcc.gnu.org/bugzilla/>
  2012-04-27 13:38 ` [Bug c++/12076] gcov misreports coverage of return statement [NRV] darkraver at gmail dot com
  2012-08-20 22:51 ` paolo.carlini at oracle dot com
@ 2023-01-31  3:31 ` pinskia at gcc dot gnu.org
  2023-07-05 16:00 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-31  3:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-09-04 19:01:30         |2023-1-30

--- Comment #20 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is what is produced on the trunk:

        1:    4:std::string repeat(const std::string& p_str, unsigned int
p_count)
        -:    5:{
        1:    6:    std::string result;
       21:    7:    for (unsigned int i=0;i<p_count;++i)
       20:    8:        result+=p_str;
        1:    9:    return result;
    =====:   10:}

I don't know if it was only fixed on the trunk or was fixed before that.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-01-31  3:31 ` pinskia at gcc dot gnu.org
@ 2023-07-05 16:00 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-05 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlosgalvezp at gmail dot com

--- Comment #21 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110561 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 8+ 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-06 23:32 ` jbuck at gcc dot gnu dot org
@ 2010-01-08 17:46 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 8+ 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] 8+ messages in thread

* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
  2007-05-04  1:34 ` 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
  3 siblings, 0 replies; 8+ 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] 8+ messages in thread

* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
  2007-05-04  1:34 ` 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
  3 siblings, 0 replies; 8+ 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] 8+ messages in thread

* [Bug c++/12076] gcov misreports coverage of return statement [NRV]
       [not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
@ 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)
  3 siblings, 0 replies; 8+ 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] 8+ messages in thread

end of thread, other threads:[~2023-07-05 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-12076-4@http.gcc.gnu.org/bugzilla/>
2012-04-27 13:38 ` [Bug c++/12076] gcov misreports coverage of return statement [NRV] darkraver at gmail dot com
2012-08-20 22:51 ` paolo.carlini at oracle dot com
2023-01-31  3:31 ` pinskia at gcc dot gnu.org
2023-07-05 16:00 ` pinskia at gcc dot gnu.org
     [not found] <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
2007-05-04  1:34 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).