This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran,patch] Add checks for OPEN and CLOSE statements
- From: FX Coudert <fxcoudert at gmail dot com>
- To: gfortran List <fortran at gcc dot gnu dot org>, patch patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 8 Oct 2006 17:58:30 +0200
- Subject: [gfortran,patch] Add checks for OPEN and CLOSE statements
Hi all,
Attached patch adds compile-time checks for OPEN and CLOSE specifiers
that happen to have constant values. We can check the value of each
such specifier against the list of values allowed by a given
standard. We can also now check at compile-time some invalid
combinations, e.g. open(10,access="direct",position="append") is not
allowed because position="append" should only happen for stream or
sequential access.
Of course, when the IOSTAT or ERR specifier is present, the front-end
only generates a warning.
Regtested on x86_64-linux, comes with a pretty extensive test
coverage. A few gfortran testsuite files had to be modified to
account for the warnings now issued. OK for mainline?
FX
:ADDPATCH fortran:
Attachment:
io_checks.ChangeLog
Description: Binary data
Attachment:
io_checks.diff
Description: Binary data