view gcc/testsuite/gfortran.dg/read_dir.f90 @ 128:fe568345ddd5

fix CbC-example
author mir3636
date Wed, 11 Apr 2018 19:32:28 +0900
parents 04ced10e8804
children 84e7813d76e9
line wrap: on
line source

! { dg-do run { xfail *-*-freebsd* *-*-dragonfly* hppa*-*-hpux* powerpc-ibm-aix* } }
! PR67367
program bug
   implicit none
   character(len=1) :: c
   character(len=256) :: message
   integer ios
   call system('[ -d junko.dir ] || mkdir junko.dir')
   open(unit=10, file='junko.dir',iostat=ios,action='read',access='stream')
   if (ios.ne.0) then
      call system('rmdir junko.dir')
      call abort
   end if
   read(10, iostat=ios) c
   if (ios.ne.21) then 
      close(10, status='delete')
      call abort
   end if
   close(10, status='delete')
end program bug