summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/noadv_size.f90
blob: a3a88b18ca722808264621e781d385166cdc7456 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do run }
! PR 20774: Handle size parameter for non-advancing I/O correctly
program main
  open(77,status='scratch')
  write(77,'(A)') '123'
  rewind(77)
  read(77,'(2I2)',advance='no',iostat=k,size=n) i1,i2
  if (k >=0) call abort
  if (n /= 3) call abort
  if (i1 /= 12 .or. i2 /= 3) call abort
end program main