The error condition isn't detected for write, and is
mis-represented as an EOF for read.

$ cat exceed-recl-direct.f
      program main
      integer i,j
      open (10, form="unformatted", access="direct", recl=4)
      write (10, rec=1, err=10) 1,2
      print *,"did not detect error on write"
 10   continue
      read (10,  rec=1, err=20) i, j
      print *,"did not detect error on read"
 20   continue
      end
$ g77 exceed-recl-direct.f
$ ./a.out
$ gfortran exceed-recl-direct.f
$ ./a.out
 did not detect error on write
At line 7 of file exceed-recl-direct.f
Fortran runtime error: End of file

Different codepath from PR 30009, nevertheless related.


-- 
           Summary: Exceeding recl on direct access
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 19292
             nThis:


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

Reply via email to