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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR33985 Stream IO test with empty write, array writes, and reads.
3
program streamtest
4
  implicit none
5
  character(1)   :: lf = char(10)
6
  character(1)   :: tchar
7
  integer        :: i,j,k
8
  real(kind=4), dimension(100,100) :: anarray
9
  open(10, file="teststream", access="stream", form="unformatted")
10
  anarray = 3.14159
11
  write(10) anarray
12
  write(10, pos=1) ! This is a way to position an unformatted file
13
  anarray = 0.0
14
  read(10) anarray
15
  anarray = abs(anarray - 3.14159)
16
  if (any(anarray.gt.0.00001)) call abort()
17
  close(10,status="delete")
18
end program streamtest

powered by: WebSVN 2.1.0

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