https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100751
--- Comment #13 from Gejoe <gejoed at rediffmail dot com> --- I modified my sample-prog.c file just by adding a line of __gcov_reset before the while loop. However after a.out run , the sample-prog.c.gcov file was still showing the counters though I didn't give 'g' for __gcov_dump invocation. Quoting a portion from sample-prog.c.gcov file : #####: 9:int main() -: 10:{ -: 11: unsigned char c; -: 12: int result; #####: 13: unsigned char data[]={127,49,255,255}; #####: 14: c = '5'; -: 15: #####: 16: __gcov_reset(); <<<<<<<<Added here jin the original sample-prog.c file just to check the reset behaviour -: 17: do { -: 18: 4: 19: c = getchar(); 4: 20: result = isalnum(c); 4: 21: printf("When %c is passed, return value is %d\n", c, result); -: 22: 4: 23: if(c == 'g') 1: 24: __gcov_dump(); 3: 25: else if(c == 'r') #####: 26: __gcov_reset(); -: 27: 3: 28: }while(c != 'c'); I'm trying to now when would __gcov_reset help us in seeing the counter values reset to ##### instead of old data(numbers like 4,1,3, etc in .c.gcov file). Let me know if I miss any info.