This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/65200] Handle EPERM when opening files
- From: "jb at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Mar 2015 12:20:27 +0000
- Subject: [Bug libfortran/65200] Handle EPERM when opening files
- Auto-submitted: auto-generated
- References: <bug-65200-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65200
--- Comment #4 from Janne Blomqvist <jb at gcc dot gnu.org> ---
Suggested doc patch:
Index: gfortran.texi
===================================================================
--- gfortran.texi (revision 221234)
+++ gfortran.texi (working copy)
@@ -1328,6 +1328,22 @@
also force cache validation and flushing dirty data and metadata.
+@node Files opened without an explicit ACTION= specifier
+@section Files opened without an explicit ACTION= specifier
+@cindex open, action
+
+The Fortran standard says that if an @code{OPEN} statement is executed
+without an explicit @code{ACTION=} specifier, the default value is
+processor dependent. GNU Fortran behaves as follows:
+
+@enumerate
+@item Attempt to open the file with @code{ACTION='READWRITE'}
+@item If that fails, try to open with @code{ACTION='READ'}
+@item If that fails, try to open with @code{ACTION='WRITE'}
+@item If that fails, generate an error
+@end enumerate
+
+
@c ---------------------------------------------------------------------
@c Extensions
@c ---------------------------------------------------------------------