[Bug libfortran/28747] New: Empty write STREAM I/O file positioning problem

jvdelisle at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 16 03:12:00 GMT 2006


The following does not work with bleeding edge FreeBSD:

program streamtest
  implicit none
  character(1)   :: lf = char(10)
  character(1)   :: tchar
  integer        :: i,j,k
  real(kind=4), dimension(100,100) :: anarray
  open(10, file="teststream", access="stream", form="unformatted")
  anarray = 3.14159
  write(10) anarray
  anarray = 0.0
  write(10, pos=1) ! This should position for the following read
  read(10) anarray
  anarray = abs(anarray - 3.14159)
  if (any(anarray.gt.0.00001)) call abort()
  close(10,status="delete")
end program streamtest


-- 
           Summary: Empty write STREAM I/O file positioning problem
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jvdelisle at gcc dot gnu dot org
  GCC host triplet: FreeBSD


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



More information about the Gcc-bugs mailing list