1! { dg-do run }
2! PR25828 Stream IO test 8
3! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
4PROGRAM stream_io_8
5  IMPLICIT NONE
6  integer(kind=8) mypos
7  character(10) mystring
8  real(kind=8) r
9  mypos = 0
10  mystring = "not yet"
11  r = 12.25d0
12  OPEN(UNIT=11, ACCESS="stream")
13  inquire(unit=11, pos=mypos)
14  if (mypos.ne.1) call abort()
15  WRITE(11) "first"
16  inquire(unit=11, pos=mypos)
17  if (mypos.ne.6) call abort()
18  WRITE(11) "second"
19  inquire(unit=11, pos=mypos)
20  if (mypos.ne.12) call abort()
21  WRITE(11) 1234567_4
22  inquire(unit=11, pos=mypos)
23  if (mypos.ne.16) call abort()
24  write(11) r
25  r = 0.0
26  inquire (11, pos=mypos)
27  read(11,pos=16)r
28  if (abs(r-12.25d0)>1e-10) call abort()
29  inquire(unit=11, pos=mypos)
30  inquire(unit=11, access=mystring)
31  if (mypos.ne.24) call abort()
32  if (mystring.ne."STREAM") call abort()
33  CLOSE(UNIT=11, status="delete")
34END PROGRAM stream_io_8
35