Using a fresh build of gfortran from the cvs archive (old versions of gfortran
hit the now fixed - Internal Error: Recursive library error) I get an error
trying to open a direct access file  (g77 and Absoft f77 are happy with it and
gfortran works ok if status='SCRATCH' is used instead of the variable) -

[dranta:~/tests/gfortran] dir% g77 -o direct direct.f
[dranta:~/tests/gfortran] dir% direct
[dranta:~/tests/gfortran] dir% gfortran -o direct direct.f
[dranta:~/tests/gfortran] dir% direct
 ERROR SCRATCH SCRATCH 
STOP 0
[dranta:~/tests/gfortran] dir% cat direct.f
      program main
      CALL OPENF(11,642,'SCRATCH')           
      stop
      end 
      SUBROUTINE OPENF (NT,NRECL,STAT)
      CHARACTER*8 STAT*(*),STATUS
 
      STATUS=STAT
        OPEN(UNIT=NT,STATUS=STATUS,ACCESS='DIRECT',
     $     FORM='UNFORMATTED',RECL=NRECL,ERR=999)

      RETURN
 
  999 Write(*,*)'ERROR ',STAT,' ',STATUS
      RETURN
      END

-- 
           Summary: gfortran - error opening direct access file
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20749

Reply via email to