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_4.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR 27575 and PR 30009: This test checks the error checking for end
3
! of file condition.
4
! Derived from test case in PR.
5
! Submitted by Jerry DeLisle , modified by
6
! Thomas Koenig 
7
 
8
      program test
9
      integer i1,i2,i3
10
      open(unit=11,form='unformatted')
11
      write (11) 1, 2
12
      write (11) 3, 4
13
      close(11,status='keep')
14
 
15
      open(unit=11,form='unformatted')
16
 
17
      read(11, ERR=100) i1, i2, i3
18
      call abort()
19
  100 continue
20
      if (i1 /= 1 .or. i2 /= 2) call abort
21
 
22
      read(11, ERR=110) i1, i2, i3
23
      call abort()
24
  110 continue
25
      if (i1 /= 3 .or. i2 /= 4) call abort
26
 
27
      read(11, end=120) i3
28
      call abort()
29
 120  close(11,status='delete')
30
      end

powered by: WebSVN 2.1.0

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