Reset branch to trunk.
[official-gcc.git] / trunk / gcc / testsuite / gfortran.dg / streamio_2.f90
blob8260a7481c92a06a5095db94ad7e63a71bfeea77
1 ! { dg-do run }
2 ! { dg-options "-std=legacy" }
4 ! PR25828 Stream IO test 2
5 ! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
6 PROGRAM 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") call abort()
19 if (n.ne.7) call abort()
20 close(unit=11, status="delete")
21 END PROGRAM readUstream