OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [streamio_9.f90] - Blame information for rev 853

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR29053 Stream IO test 9.
3
! Contributed by Jerry DeLisle .
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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.