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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [eof_1.f90] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
! { dg-do run }
! { dg-do run }
! Program to test for proper EOF errors when reading past the end of a file.
! Program to test for proper EOF errors when reading past the end of a file.
! We used to get this wrong when a formatted read followed a list formatted
! We used to get this wrong when a formatted read followed a list formatted
! read.
! read.
program eof_1
program eof_1
  character(len=5) :: s
  character(len=5) :: s
  open (unit=11, status="SCRATCH")
  open (unit=11, status="SCRATCH")
  write (11, '(a)') "Hello"
  write (11, '(a)') "Hello"
  rewind(11)
  rewind(11)
  read(11, *) s
  read(11, *) s
  if (s .ne. "Hello") call abort
  if (s .ne. "Hello") call abort
  read(11, '(a5)', end=10) s
  read(11, '(a5)', end=10) s
  call abort
  call abort
10 continue
10 continue
  close (11)
  close (11)
end
end
 
 

powered by: WebSVN 2.1.0

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