This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/16196] New: gfortran fails to create file with OPEN(...,status='REPLACE')
- From: "grief at maths dot ox dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2004 12:00:29 -0000
- Subject: [Bug fortran/16196] New: gfortran fails to create file with OPEN(...,status='REPLACE')
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
The fortran code:
PROGRAM iobug
OPEN(UNIT=10,FILE='gfcoutput.txt',status='REPLACE')
END PROGRAM iobug
gives the output:
bash$ ./a.out
At line 6 of file gfcio.f90
Fortran runtime error: No such file or directory
bash$
when the file 'gfcoutput.txt' does *not* exist at runtime. The program should
create this file if it does not exist when the flag status='REPLACE' is used.
The program does the right thing if the file already exists at runtime.
Here's the output for the version report:
Reading specs from
/merlot/staff/pmzag/irun/bin/../lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc/configure --enable-languages=c,f95
--prefix=/usr/work/2004177/irun
Thread model: posix
gcc version 3.5.0 20040625 (experimental)
I couldn't find this in Bugzilla already, but it's the first time I've used
Bugzilla... Many thanks.
Andrew
--
Summary: gfortran fails to create file with
OPEN(...,status='REPLACE')
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: grief at maths dot ox dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: gcc version 3.5.0 20040625 (experimental)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16196