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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [streamio_10.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR25093 Stream IO test 10
3
! Contributed by Jerry DeLisle .
4
! Test case derived from that given in PR by Steve Kargl.
5
program stream_io_10
6
  implicit none
7
  integer :: a(4), b(4)
8
  integer(kind=8) :: thepos
9
  a = (/ 1, 2, 3, 4 /)
10
  b = a
11
  open(10, file="teststream", access="stream")
12
  write(10) a
13
  inquire(10, pos=thepos)
14
  if (thepos.ne.17) call abort()
15
 
16
  read(10, pos=1)
17
  inquire(10, pos=thepos)
18
  if (thepos.ne.1) call abort()
19
 
20
  write(10, pos=15)
21
  inquire(10, pos=thepos)
22
  if (thepos.ne.15) call abort()
23
 
24
  read(10, pos=3)
25
  inquire(10, pos=thepos)
26
  if (thepos.ne.3) call abort()
27
 
28
  write(10, pos=1)
29
  inquire(10, pos=thepos)
30
  if (thepos.ne.1) call abort()
31
 
32
  a = 0
33
  read(10) a
34
  if (any(a /= b)) call abort()
35
 
36
  close(10, status="delete")
37
end program stream_io_10

powered by: WebSVN 2.1.0

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