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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [streamio_8.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR25828 Stream IO test 8
3
! Contributed by Jerry DeLisle .
4
PROGRAM stream_io_8
5
  IMPLICIT NONE
6
  integer(kind=8) mypos
7
  character(10) mystring
8
  real(kind=8) r
9
  mypos = 0
10
  mystring = "not yet"
11
  r = 12.25d0
12
  OPEN(UNIT=11, ACCESS="stream")
13
  inquire(unit=11, pos=mypos)
14
  if (mypos.ne.1) call abort()
15
  WRITE(11) "first"
16
  inquire(unit=11, pos=mypos)
17
  if (mypos.ne.6) call abort()
18
  WRITE(11) "second"
19
  inquire(unit=11, pos=mypos)
20
  if (mypos.ne.12) call abort()
21
  WRITE(11) 1234567_4
22
  inquire(unit=11, pos=mypos)
23
  if (mypos.ne.16) call abort()
24
  write(11) r
25
  r = 0.0
26
  inquire (11, pos=mypos)
27
  read(11,pos=16)r
28
  if (abs(r-12.25d0)>1e-10) call abort()
29
  inquire(unit=11, pos=mypos)
30
  inquire(unit=11, access=mystring)
31
  if (mypos.ne.24) call abort()
32
  if (mystring.ne."STREAM") call abort()
33
  CLOSE(UNIT=11, status="delete")
34
END PROGRAM stream_io_8

powered by: WebSVN 2.1.0

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