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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [append-1.f90] - Blame information for rev 868

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

Line No. Rev Author Line
1 149 jeremybenn
! PR libfortran/21471
2
! Testing POSITION="APPEND"
3
!
4
! { dg-do run }
5
      subroutine failed
6
        close (10,status='delete')
7
        call abort
8
      end subroutine failed
9
 
10
      integer,parameter :: n = 13
11
      integer :: i, j, error
12
 
13
      open (10, file='foo')
14
      close (10)
15
 
16
      do i = 1, n
17
        open (10, file='foo',position='append')
18
        write (10,*) i
19
        close (10)
20
      end do
21
 
22
      open (10,file='foo',status='old')
23
      error = 0
24
      i = -1
25
      do while (error == 0)
26
        i = i + 1
27
        read (10,*,iostat=error) j
28
        if (error == 0) then
29
          if (i + 1 /= j) call failed
30
        end if
31
        if (i > n + 1) call failed
32
      end do
33
      if (i /= n) call failed
34
      close (10,status='delete')
35
      end
36
 

powered by: WebSVN 2.1.0

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