[Bug libfortran/18653] New: open call should open for read-only if open for read/write fails.
sje at cup dot hp dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 24 17:46:00 GMT 2004
If we have the following program:
OPEN(10,FILE='wup.in',STATUS='OLD')
CLOSE(10, STATUS='KEEP')
END
And a data file that is readable by everyone and writable by nobody:
$ ll wup.in
-r--r--r-- 1 sje other 0 Nov 24 08:43 wup.in
gfortran will fail on the open (because it tries to open for read & write),
other compilers will open for read-only if they cannot open for reading and
writing.
Opening for read-only is not required by the Fortran standard but it is how
most Fortran compilers (HP, Intel, g77) behave.
--
Summary: open call should open for read-only if open for
read/write fails.
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sje at cup dot hp dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-hp-hpux11.23
GCC host triplet: ia64-hp-hpux11.23
GCC target triplet: ia64-hp-hpux11.23
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18653
More information about the Gcc-bugs
mailing list