view gcc/testsuite/gfortran.dg/inquire_16.f90 @ 118:fd00160c1b76

ifdef TARGET_64BIT
author mir3636
date Tue, 27 Feb 2018 15:01:35 +0900
parents 04ced10e8804
children 84e7813d76e9
line wrap: on
line source

! { dg-do run }
!
! PR fortran/60286
!
! Contributed by  Alexander Vogt
!
program test_inquire
  use, intrinsic :: ISO_Fortran_env
  implicit none
  character(len=20) :: s_read, s_write, s_readwrite

  inquire(unit=input_unit, read=s_read, write=s_write, &
          readwrite=s_readwrite)
  if (s_read /= "YES" .or. s_write /= "NO" .or. s_readwrite /="NO") then
    call abort()
  endif

  inquire(unit=output_unit, read=s_read, write=s_write, &
          readwrite=s_readwrite)
  if (s_read /= "NO" .or. s_write /= "YES" .or. s_readwrite /="NO") then
    call abort()
  endif

  inquire(unit=error_unit, read=s_read, write=s_write, &
          readwrite=s_readwrite)
  if (s_read /= "NO" .or. s_write /= "YES" .or. s_readwrite /="NO") then
    call abort()
  endif
end program test_inquire