public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12076] New: gcov misreports coverage of return statement
@ 2003-08-27  9:34 r dot lichtenberger at icoserve dot com
  2005-07-25  1:52 ` [Bug c++/12076] gcov misreports coverage of return statement [NVR] pinskia at gcc dot gnu dot org
  2005-07-25 21:04 ` jbuck at gcc dot gnu dot org
  0 siblings, 2 replies; 8+ messages in thread
From: r dot lichtenberger at icoserve dot com @ 2003-08-27  9:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: gcov misreports coverage of return statement
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: r dot lichtenberger at icoserve dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

I compiled & ran this little program:
#include <string>
#include <iostream>

std::string repeat(const std::string& p_str, unsigned int p_count)
{
    std::string result;
    for (unsigned int i=0;i<p_count;++i)
        result+=p_str;
    return result;
}

int main(void)
{
        std::cout << repeat("gnu", 20) << std::endl;

        return 0;
}

The line containing the return statement is marked as "not run", which cannot be:
                std::string repeat(const std::string& p_str, unsigned int p_count)
           1    {
           1        std::string result;
          21        for (unsigned int i=0;i<p_count;++i)
          20            result+=p_str;
      ######        return result;
                }


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

end of thread, other threads:[~2010-01-08 17:46 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-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
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
2003-08-27  9:34 [Bug c++/12076] New: gcov misreports coverage of return statement r dot lichtenberger at icoserve dot com
2005-07-25  1:52 ` [Bug c++/12076] gcov misreports coverage of return statement [NVR] pinskia at gcc dot gnu dot org
2005-07-25 21:04 ` jbuck 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).