OSDN Git Service

2006-11-28 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / streamio_2.f90
1 ! { dg-do run }
2 ! PR25828 Stream IO test 2
3 ! Contributed by Jerry DeLisle <jvdelisle@verizon.net>.
4 PROGRAM readUstream
5   IMPLICIT NONE
6   CHARACTER*3 :: string
7   INTEGER :: n
8   string = "123"
9   n = 13579
10   OPEN(UNIT=11, FILE="streamio2", ACCESS="STREAM")
11   WRITE(11) "first"
12   WRITE(11) "second"
13   WRITE(11) 7
14   READ(11, POS=3) string
15   READ(11, POS=12) n
16   if (string.ne."rst") call abort()
17   if (n.ne.7) call abort()
18   close(unit=11, status="delete")
19 END PROGRAM readUstream