[Bug gcov-profile/106090] [GCOV] Wrong coverage for loop statements
njuwy at smail dot nju.edu.cn
gcc-bugzilla@gcc.gnu.org
Mon Jul 4 12:15:16 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106090
--- Comment #5 from Yang Wang <njuwy at smail dot nju.edu.cn> ---
(In reply to Martin Liška from comment #4)
> > do_it() is indeed called 4 times,but I wonder how the coverage statistiscs
> > of the for-statement is calculated. It doesn't become 5 untill the
> > for-stamentment is completed.
>
> We count a line every time there exists a jump from a different line that
> jumps to the line.
> Thus for `for(;;)` there are no statements we should jump to.
Thanks for your reply, I have figured it out. "0<1" is used as a conditional
judgment of permanent true, and its execution is optimized away.
I also find that two previously reported issues(#100980,#101618) have
disappeared in the new version.Could you mind doing me a favor to take a look
if you have a minute?
More information about the Gcc-bugs
mailing list