Fix compilation failure with C++98 compilers
[official-gcc.git] / gcc / testsuite / gfortran.dg / inquire_15.f90
blob5971dc6fe0cb729a510083d3feea5511d5894599
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") STOP 1
8 inquire(99, stream=str)
9 !print *, "str=",str
10 if (str /= "UNKNOWN") STOP 2
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 STOP 3
29 end