https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123029
Bug ID: 123029
Summary: OPEN statement with BLANK= is erroneously flagged by
-std=f95
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: w6ws at earthlink dot net
Target Milestone: ---
program blankio
implicit none
! BLANK= has been legal since Fortran 77 first Standardized the
! OPEN statement. It should not be an error with -std=f95.
open (1, file='xyzzy', form='formatted', blank='null')
close (1)
end program
When compiled with gfortran and -std=f95:
$ gfortran -c -std=f95 blankio.f90
blankio.f90:7:49:
7 | open (1, file='xyzzy', form='formatted', blank='null')
| 1
Error: Fortran 2003: BLANK= at (1) not allowed in Fortran 95
$
There are a couple places in io.cc where this check happens. I'm not sure how
the code got there in the first place, as it was before all the files got
renamed from .c to .cc. But since BLANK= is Standard Fortran 77, and remains
standard through the latest version, it seems to be an erroneous check.