[Bug fortran/25036] New: Reopening a file with STATUS='UNKNOWN' should work
jb at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 25 19:04:00 GMT 2005
The program
program test
integer :: fh = 71
open(fh, file="f", form='unformatted', status='unknown')
! close(fh)
open(fh, file="f", form='unformatted', status='unknown')
end program
fails with
At line 5 of file file-status-old.f90
Fortran runtime error: OPEN statement must have a STATUS of OLD
The F2003 standard says that if status='unknown', which is the same as if no
status specifier is present, then the status is processor dependent. So
technically this is not a standard conformance bug, but it's still a problem
for some real codes, and it doesn't cost us anything to allow it.
Thanks to Bernhard Fischer for bringing up this problem.
--
Summary: Reopening a file with STATUS='UNKNOWN' should work
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: jb at gcc dot gnu dot org
ReportedBy: jb at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25036
More information about the Gcc-bugs
mailing list