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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [read_x_past.f] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options -w }
3
! PR 26661 : Test reading X's past file end with no LF or CR.
4
! PR 26880 : Tests that rewind clears the gfc_unit read_bad flag.
5
! PR 43265 : Tests that no error occurs with or without X at end.
6
! Contributed by Jerry DeLisle <jvdelisle@gcc.gnu.org>.
7
      implicit none
8
      character(3) a(4)
9
      integer i
10
      open (10, status="scratch")
11
 10   format(A,$)  ! This is not pedantic
12
      write(10,10)' abc def ghi jkl'
13
      rewind(10)
14
 
15
      a = ""
16
      read(10,20)(a(i),i=1,4)
17
      if (a(4).ne."jkl") call abort()
18
 
19
      rewind(10)
20
 
21
      a = ""
22
      read(10,30)(a(i),i=1,4)
23
      if (a(4).ne."jkl") call abort()
24
 
25
 20   format(1x,a3,1x,a3,1x,a3,1x,a3,10x)
26
 30   format(1x,a3,1x,a3,1x,a3,1x,a3)
27
      close(10)
28
      end

powered by: WebSVN 2.1.0

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