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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [backspace_5.f] - 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
! 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
      idata = -42
9
      open (11, status="scratch", form="unformatted")
10
        idata(1)   =  -1
11
        idata(  datasize)   =  -2
12
       write(11)idata
13
        idata(1)   =  -2
14
        idata(  datasize)   =  -3
15
       write(11)idata
16
        idata(1)   =  -3
17
        idata(  datasize)   =  -4
18
       write(11)idata
19
        idata(1)   =  -4
20
        idata(  datasize)   =  -5
21
       write(11)idata
22
       read(11,end=        1000 )idata
23
       call abort()
24
 1000  continue
25
       backspace 11
26
       backspace 11
27
       backspace 11
28
       read(11,end=        1001 )idata
29
       if(idata(1).ne.-3 .or. idata(datasize).ne.-4) call abort()
30
       stop
31
 1001  continue
32
       call abort()
33
 1010  stop
34
       end
35
 

powered by: WebSVN 2.1.0

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