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
  2003-08-27 14:05 ` [Bug c++/12076] " bangerth at dealii dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 14+ 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] 14+ messages in thread
[parent not found: <bug-12076-6823@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2006-01-21 22:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27  9:34 [Bug c++/12076] New: gcov misreports coverage of return statement r dot lichtenberger at icoserve dot com
2003-08-27 14:05 ` [Bug c++/12076] " bangerth at dealii dot org
2003-11-28  8:02 ` [Bug other/12076] gcov misreports coverage of return statement (for inline functions) pinskia at gcc dot gnu dot org
2003-11-28  9:11 ` r dot lichtenberger at icoserve dot com
2003-11-28 17:47 ` pinskia at gcc dot gnu dot org
2003-12-01  6:27 ` r dot lichtenberger at icoserve dot com
2003-12-01  6:33 ` pinskia at gcc dot gnu dot org
2003-12-26 23:11 ` pinskia at gcc dot gnu dot org
2004-05-21 21:52 ` pinskia at gcc dot gnu dot org
2004-08-13  0:04 ` pinskia at gcc dot gnu dot org
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
     [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

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).