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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! pr24719, non-advancing read should read more than one line
3
! test contributed by jerry delisle 
4
      implicit none
5
      character(1) :: chr
6
      character(20) :: correct = 'foo: bar 123abc'
7
      integer :: i
8
      open(unit = 11, status = "scratch", action="readwrite")
9
      write(11,'(a)') "foo: bar"
10
      write(11,'(a)') "123abc"
11
      rewind(11)
12
      i = 0
13
      do
14
        i = i + 1
15
10      read(unit = 11, fmt = '(a)', advance = 'no', end = 99, eor = 11) chr
16
        if (chr.ne.correct(i:i)) call abort()
17
        cycle
18
11      continue
19
      end do
20
99    close(11)
21
      end

powered by: WebSVN 2.1.0

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