https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87606
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |tkoenig at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- According to the docs: -Wdo-subscript Warn if an array subscript inside a DO loop could lead to an out-of-bounds access even if the compiler can not prove that the statement is actually executed, in cases like real a(3) do i=1,4 if (condition(i)) then a(i) = 1.2 end if end do This option is implied by -Wextra. Solution: Do not use the option unless you want it to do what it says. Currently, we do not have error supressing pragmas, this would be an even better method.