https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101773
--- Comment #4 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> --- GCOV_EXIT_AT_ERROR is not documented in the man page. Anyway, it doesn't seem to work: $ export GCOV_EXIT_AT_ERROR=1 $ printenv GCOV_EXIT_AT_ERROR 1 $ gcc-test -O -fprofile-generate=dir tst.c $ ./a.out $ echo $? 0 $ ls -l dir/*.gcda -rw-r--r-- 1 vlefevre vlefevre 0 2021-08-04 14:48:01 dir/#home#vlefevre#a-tst.gcda