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/] [unf_short_record_1.f90] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
! { dg-do run }
! { dg-do run }
! PR 29627 - partial reads of unformatted records
! PR 29627 - partial reads of unformatted records
program main
program main
  character a(3)
  character a(3)
  character(len=50) msg
  character(len=50) msg
  open(10, form="unformatted", status="unknown")
  open(10, form="unformatted", status="unknown")
  write (10) 'a'
  write (10) 'a'
  write (10) 'c'
  write (10) 'c'
  a = 'b'
  a = 'b'
  rewind 10
  rewind 10
  read (10, err=20, iomsg=msg) a
  read (10, err=20, iomsg=msg) a
  call abort
  call abort
20 continue
20 continue
  if (msg .ne. "I/O past end of record on unformatted file") call abort
  if (msg .ne. "I/O past end of record on unformatted file") call abort
  if (a(1) .ne. 'a' .or. a(2) .ne. 'b' .or. a(3) .ne. 'b') call abort
  if (a(1) .ne. 'a' .or. a(2) .ne. 'b' .or. a(3) .ne. 'b') call abort
  close (10, status="delete")
  close (10, status="delete")
end program main
end program main
 
 

powered by: WebSVN 2.1.0

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