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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [backspace_5.f] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
!{ dg-do run }
2
! PR26464 File I/O error related to buffering and BACKSPACE
3
! Test case derived from case by Dale Ranta.
4
! Submitted  by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
5
      program test
6
      integer,parameter :: datasize = 1000
7
      dimension idata(datasize)
8
      open (11, status="scratch", form="unformatted")
9
        idata(1)   =  -1
10
        idata(  datasize)   =  -2
11
       write(11)idata
12
        idata(1)   =  -2
13
        idata(  datasize)   =  -3
14
       write(11)idata
15
        idata(1)   =  -3
16
        idata(  datasize)   =  -4
17
       write(11)idata
18
        idata(1)   =  -4
19
        idata(  datasize)   =  -5
20
       write(11)idata
21
       read(11,end=        1000 )idata
22
       call abort()
23
 1000  continue
24
       backspace 11
25
       backspace 11
26
       backspace 11
27
       read(11,end=        1001 )idata
28
       if(idata(1).ne.-3 .or. idata(datasize).ne.-4) call abort()
29
       stop
30
 1001  continue
31
       call abort()
32
 1010  stop
33
       end
34
 

powered by: WebSVN 2.1.0

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