[Bug gcov-profile/83678] [GCOV] a pointer assignment before a break statment lead to incorrect coverage in gcov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83678 Martin Liška changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |WONTFIX --- Comment #2 from Martin Liška --- Due to folding of dead-code it's all optimized out.
[Bug gcov-profile/83678] [GCOV] a pointer assignment before a break statment lead to incorrect coverage in gcov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83678 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2018-04-03 Target Milestone|--- |9.0 Ever confirmed|0 |1
[Bug gcov-profile/83678] [GCOV] a pointer assignment before a break statment lead to incorrect coverage in gcov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83678 --- Comment #1 from Yibiao Yang --- simpler reproducer: void main() { while (1) { int a; if (0) break; if (1) break; } } $ gcc-8 small.c -fprofile-arcs -ftest-coverage; ./a.out gcov-8 small.c; cat small.c.gcov -:0:Source:small.c -:0:Graph:small.gcno -:0:Data:small.gcda -:0:Runs:1 -:0:Programs:1 1:1:void main() { -:2: while (1) { -:3:int a; -:4: -:5:if (0) 1:6: break; -:7:if (1) 1:8: break; -:9: } 1: 10:} Line #6 is wrongly marked as executed.