The following has a problem

      integer buf(200),ios
      buf(1) = -77
      buf(2) = -77
      open(10,file='cow',access='DIRECT',recl=100,iostat=ios)
      print *,' open ios ',ios
      read(10,rec=1,iostat=ios) buf
      print *,' read ios ',ios
      print *,' buf 1 2  ',buf(1),buf(2)
      end

When executed it creates an empty file. When the first record is read, it
returns iostat=0 and changes the first two integers. Iostat should not be
zero because the read was not finished.


-- 
           Summary: iostat on read
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ray at ultramarine dot com


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

Reply via email to