https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108592
Bug ID: 108592
Summary: In IF statements -Winteger-division is repeated 4
times
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: rimvydas.jas at gmail dot com
Target Milestone: ---
$ cat intdiv.f90
program foo
if (8 < (20/9)) stop 8
end program
$ gfortran -Wall intdiv.f90
intdiv.f90:2:11:
2 | if (8 < (20/9)) stop 8
| 1
Warning: Integer division truncated to constant ‘2’ at (1) [-Winteger-division]
intdiv.f90:2:11:
2 | if (8 < (20/9)) stop 8
| 1
Warning: Integer division truncated to constant ‘2’ at (1) [-Winteger-division]
intdiv.f90:2:11:
2 | if (8 < (20/9)) stop 8
| 1
Warning: Integer division truncated to constant ‘2’ at (1) [-Winteger-division]
intdiv.f90:2:11:
2 | if (8 < (20/9)) stop 8
| 1
Warning: Integer division truncated to constant ‘2’ at (1) [-Winteger-division]
Diagnostic is given only twice for if/then/endif form:
if (8 < (20/9)) then ; endif