public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "chipitsine at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/102746] New: gcov returns 0 un erroneuos incovation
Date: Thu, 14 Oct 2021 14:44:18 +0000	[thread overview]
Message-ID: <bug-102746-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 102746
           Summary: gcov returns 0 un erroneuos incovation
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chipitsine at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

repro steps:

several source files (for example, two)

main.c:

void hello(void);

void main(void){
 hello();
}

hello.c:

#include <stdio.h>

void hello(void) {
   printf("hello"); 
}


..................

build with coverage (using master branch gcc)

gcc --coverage -o hello main.c hello.c

....................

execute

./hello



executing "gcov" in erroneous way 

gcov "hello-hello.gcda  hello-main.gcda"
hello-hello.gcda  hello-main.gcno:cannot open notes file
hello-hello.gcda  hello-main.gcda:cannot open data file, assuming not executed
No executable lines

however, exit status is "0"

$ echo $?
0
$



it is hard to identify error situation when exit status is "0". I beleive it
should be "1" under such circumstances

             reply	other threads:[~2021-10-14 14:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 14:44 chipitsine at gmail dot com [this message]
2021-10-14 15:12 ` [Bug gcov-profile/102746] " marxin at gcc dot gnu.org
2021-10-14 15:17 ` chipitsine at gmail dot com
2021-10-15  6:32 ` chipitsine at gmail dot com
2021-10-15  8:20 ` marxin at gcc dot gnu.org
2021-10-15  8:20 ` marxin at gcc dot gnu.org
2021-10-18 11:13 ` cvs-commit at gcc dot gnu.org
2021-10-18 11:14 ` marxin at gcc dot gnu.org
2021-10-18 12:11 ` chipitsine at gmail dot com
2021-10-18 12:17 ` marxin at gcc dot gnu.org
2021-10-18 12:30 ` chipitsine at gmail dot com
2021-10-19 12:56 ` 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-102746-4@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).