This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Fortran standard question: open()
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: fortran at gcc dot gnu dot org
- Date: Wed, 24 Nov 2004 09:06:46 -0800 (PST)
- Subject: Fortran standard question: open()
- Reply-to: sje at cup dot hp dot com
I have noticed a difference between the HP Fortran compiler and gfortran
and was wondering if someone familiar with the Fortran standard could
tell me if this is a bug or just an implementation difference.
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
Then when I use the HP compiler to build the program it runs fine, but
if I use gfortran, it fails. Obviously gfortran is trying to open the
file for reading and writing (since I didn't specify) and the open is
failing. If I give myself write permssion to the file, the gfortran
compiled program runs fine.
Is this a compiler bug?
Steve Ellcey
sje@cup.hp.com