This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug fc002



-- Walt Brainerd +1-877-355-6640 (voice & fax) The Fortran Company +1-520-760-1397 (outside USA) 6025 N. Wilmot Road walt@fortran.com Tucson, AZ 85750 USA http://www.fortran.com

program fc002

! Submitted by Walt Brainerd, The Fortran Company
! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental))
! Windows XP

! End of record is not detected
!    on second READ
! iostats should be 0, 0, -2, -1

   character(len=1) :: c
   integer :: k
   character(len=*), parameter :: f="(a)"
   open(11,file="xxx",status="replace", iostat=k)
   print *, "iostat", k
   write(11,f) "x"
   rewind (11)
   read(11, f, advance="no", iostat=k) c
   print *, "iostat", k, c
   read(11, f, advance="no", iostat=k) c
   print *, "iostat", k, c
   read(11, f, advance="no", iostat=k) c
   print *, "iostat", k, c

end program fc002

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]