[gfortran,patch] Add checks for OPEN and CLOSE statements

FX Coudert fxcoudert@gmail.com
Sun Oct 8 16:26:00 GMT 2006


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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_checks.ChangeLog
Type: application/octet-stream
Size: 837 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061008/46801f0d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io_checks.diff
Type: application/octet-stream
Size: 24071 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061008/46801f0d/attachment-0001.obj>


More information about the Gcc-patches mailing list