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