view gcc/testsuite/gfortran.dg/eof_5.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
!
! PR fortran/56696
!
! Contributed by Keith Refson
!

program iotest
   character(len=258) :: inp = ' 1.0 1.0 1.0'
   character(len=7) :: inp2 = '1 2 3 4'
   integer :: ios
   real :: a1, a2, a3, a4

   read(inp2,*,iostat=ios) a1, a2, a3, a4
   if (ios /= 0) STOP 1

   read(inp,*,iostat=ios) a1, a2, a3, a4
   if (ios == 0) STOP 2
!   write(*,*) 'IOSTAT=',ios
end program iotest