aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/inquire_15.f90
blob: ae94270ca8faaa5513049e16a0dd73efa48cc3b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
! { dg-do run }
! PR48976 test case by jvdelisle@gcc.gnu.org
character(len=20) :: str
str = "abcdefg"
inquire(file="abcddummy", stream=str)
!print *, "str=",str
if (str /= "UNKNOWN") call abort
inquire(99, stream=str)
!print *, "str=",str
if (str /= "UNKNOWN") call abort
open(99,access="stream")
inquire(99, stream=str)
!print *, "str=",str
if (str /= "YES") goto 10
close(99)
open(99,access="direct", recl=16)
inquire(99, stream=str)
!print *, "str=",str
if (str /= "NO") goto 10
close(99)
open(99,access="sequential")
inquire(99, stream=str)
!print *, "str=",str
if (str /= "NO") goto 10
close(99, status="delete")
stop
10 close(99, status="delete")
call abort
end