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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [read_size_noadvance.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
! PR26890 Test for use of SIZE variable in IO list.
! Test case from Paul Thomas.
! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>

  character(80) :: buffer, line
  integer :: nchars
  line = "The quick brown fox jumps over the lazy dog."
  open (10, status="scratch")
  write (10, '(a)') trim(line)
  rewind (10)
  read (10, '(a)', advance = 'no', size = nchars, eor = 998) buffer
  call abort()
998 if (nchars.ne.44) call abort()
  rewind (10)
  buffer = "how about some random text here just to be sure on this one."
  nchars = 80
  read (10, '(a)', advance = 'no', size = nchars, eor = 999) buffer(:nchars)
999 if (nchars.ne.44) call abort()
  if (buffer.ne.line) call abort()
  close (10)
end

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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