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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [backspace_6.f] - Blame information for rev 414

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

Line No. Rev Author Line
1 302 jeremybenn
!{ dg-do run { target fd_truncate } }
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 = 5000
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
       backspace 11
20
       backspace 11
21
        idata(1)   =  -2
22
        idata(datasize)   =  -3
23
       write(11)idata
24
       read(11,end=        1003 )idata
25
       call abort()
26
 1003  continue
27
       backspace 11
28
       backspace 11
29
       read(11,end=        1004 )idata
30
       if(idata(1).ne.-2 .or.idata(datasize).ne.-3) call abort()
31
       stop
32
 1004  continue
33
       end
34
 

powered by: WebSVN 2.1.0

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