https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85217

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Anonymous from comment #5)
> This bug still reproduces on current GCC trunk. Re-tested with gcc 17.0.0
>   (experimental, 2026-11-01); also reproduced on gcc 13.1.0 and 11.4.0.

Please open a new bug report.

> 
>   Test case (small.c):
> 
>       int a=0;
> 
>       void main() {
>         for (;; a++) {
>           int c[1];
>           if (a) {
>             break;
>             a;
>             continue;
>           }
>           continue;
>         }
>       }
> 
>       $ gcc -w --coverage small.c && ./a.out && gcov small.c
> 
>   Current output:
> 
>               2:    3:void main() {
>               2:    4:  for (;; a++) {
>               -:    5:    int c[1];
>               2:    6:    if (a) {
>               1:    7:      break;
>               -:    8:      a;
>               1:    9:      continue;
>               -:   10:    }
>               1:   11:    continue;
>               -:   12:  }
>               1:   13:}
> 
>   Line 9 ("continue;" after "break; a;") is still marked as executed (count
> 1),
>   but it is unreachable because the preceding "break;" exits the for loop; it
>   should be reported as not executed. This is the same symptom as the
> original
>   report. Could this be reopened and re-examined?

Reply via email to