Bug 7236

Summary: OPEN(...,RECL=nnn,...) without ACCESS='DIRECT' should assume a direct access file.
Product: gcc Reporter: Toon Moene <toon>
Component: libf2cAssignee: Toon Moene <toon>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3 Keywords: rejects-valid
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Toon Moene 2002-07-08 12:35:59 UTC
The following program:

      open(unit=1,file='datafile.dat',recl=132,status='old')
      Read(1,10) x,y,z
10    FOrmat(3f10.2)
      end

fails with:

sfe: formatted io not allowed
apparent state: unit 1 named datafile.dat
lately reading sequential formatted external IO

probably because it assumes direct access (due to the
recl=132 clause) which defaults to unformatted I/O.

Release:
gcc-3.x

Environment:
All
Comment 1 Toon Moene 2002-07-08 12:35:59 UTC
Fix:
Should implement Fortran 90 semantics, i.e., assume
a sequential file (because ACCESS='DIRECT' is not
specified) and hence formatted I/O.
Comment 2 Toon Moene 2002-07-10 14:22:22 UTC
Responsible-Changed-From-To: unassigned->toon
Responsible-Changed-Why: Fortran Maintainer.
Comment 3 Toon Moene 2002-07-10 14:22:22 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Fixed for next major release.
    
    See: http://gcc.gnu.org/ml/gcc-cvs/2002-07/msg00242.html