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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [read_eof_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
! { dg-do run }
2
! PR25697 Check that reading from a file that is at end-of-file does not
3
! segfault or give error.  Test case derived from example in PR from Dale Ranta.
4
! Contributed by Jerry DeLisle  
5
       integer data(9)
6
       do i = 1,9
7
         data(i)=-3
8
       enddo
9
       open(unit=11,status='scratch',form='unformatted')
10
       write(11)data
11
       read(11,end=        1000 )data
12
       call abort()
13
 1000  continue
14
       backspace 11
15
       backspace 11
16
       write(11)data
17
       rewind 11
18
       data = 0
19
       read(11,end=        1001 )data
20
 1001  continue
21
       read(11,end=        1002 )data
22
       call abort
23
 1002  continue
24
       if (.not. all(data == -3)) call abort()
25
       close(11)
26
       end
27
 

powered by: WebSVN 2.1.0

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