1! { dg-do run }
2! { dg-options "-std=legacy" }
3!
4! PR25828 Stream IO test 2
5! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
6PROGRAM readUstream
7  IMPLICIT NONE
8  CHARACTER*3 :: string
9  INTEGER :: n
10  string = "123"
11  n = 13579
12  OPEN(UNIT=11, FILE="streamio2", ACCESS="STREAM")
13  WRITE(11) "first"
14  WRITE(11) "second"
15  WRITE(11) 7
16  READ(11, POS=3) string
17  READ(11, POS=12) n
18  if (string.ne."rst") STOP 1
19  if (n.ne.7) STOP 2
20  close(unit=11, status="delete")
21END PROGRAM readUstream
22
23