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_5.f90] - Blame information for rev 827

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR25828 Stream IO test 5, unformatted single byte
3
! Contributed by Jerry DeLisle .
4
program streamtest5
5
  implicit none
6
  character(1)   :: lf = char(10)
7
  character(1)   :: tchar
8
  integer        :: i,j,k
9
 
10
  open(10, file="teststream", access="stream", form="unformatted")
11
 
12
  do i=1,1229
13
    do j=0,9
14
      write(10) j
15
    end do
16
    write(10) lf
17
  end do
18
 
19
  close(10)
20
 
21
  open(10, file="teststream", access="stream", form="unformatted")
22
 
23
  do i=1,1229
24
    do j=0,9
25
      read(10) k
26
      if (k.ne.j) call abort()
27
    end do
28
    read(10) tchar
29
    if (tchar.ne.lf) call abort()
30
  end do
31
  close(10,status="delete")
32
end program streamtest5

powered by: WebSVN 2.1.0

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