public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/96622] gcov misses to count break statement
Date: Mon, 17 Aug 2020 08:21:03 +0000	[thread overview]
Message-ID: <bug-96622-4-grDFGVWbiQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96622-4@http.gcc.gnu.org/bugzilla/>

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Please use -O0 for more precise gcov instrumentation:

        -:    0:Source:my_strndup.c
        -:    1:#include <assert.h>
        -:    2:#include <stdlib.h>
        -:    3:#include <string.h>
        -:    4:
        3:    5:void *my_strndup(const char *s, size_t n)
        -:    6:{
        3:    7:    size_t len = 0;
       23:    8:    for (len = 0; len < n; len++)
       22:    9:        if (s[len] == '\0')
        2:   10:            break;
        -:   11:
        3:   12:    char *p = malloc(len + 1);
       3*:   13:    assert(p);
        -:   14:
        3:   15:    memcpy(p, s, len);
        3:   16:    p[len] = '\0';
        -:   17:
        3:   18:    return p;
        -:   19:}

  parent reply	other threads:[~2020-08-17  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15  1:15 [Bug gcov-profile/96622] New: " roland.illig at gmx dot de
2020-08-15  2:13 ` [Bug gcov-profile/96622] " roland.illig at gmx dot de
2020-08-17  8:21 ` marxin at gcc dot gnu.org [this message]
2020-08-19  6:26 ` roland.illig at gmx dot de
2020-08-19 10:36 ` marxin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-96622-4-grDFGVWbiQ@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).