OSDN Git Service

* obj-c++.dg/comp-types-10.mm: XFAIL for ICE.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / streamio_9.f90
1 ! { dg-do run }
2 ! PR29053 Stream IO test 9.
3 ! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>.
4 ! Test case derived from that given in PR by Steve Kargl.
5 program pr29053
6    implicit none
7    real dt, t, u, a(10), b(10)
8    integer i, place
9    dt = 1.e-6
10    a = real( (/ (i, i=1, 10) /) )
11    b = a
12    open(unit=11, file='a.dat', access='stream')
13    open(unit=12, file='b.dat', access='stream')
14    do i = 1, 10
15       t = i * dt
16       write(11) t
17       write(12) a
18    end do
19    rewind(11)
20    rewind(12)
21    do i = 1, 10
22       t = i * dt
23       read(12) a
24       if (any(a.ne.b)) call abort()
25       read(11) u
26       if (u.ne.t) call abort()
27    end do
28    close(11, status="delete")
29    close(12, status="delete")
30 end program pr29053
31