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