This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]