URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [unf_short_record_1.f90] - Rev 516
Compare with Previous | Blame | View Log
! { dg-do run }
! PR 29627 - partial reads of unformatted records
program main
character a(3)
character(len=50) msg
open(10, form="unformatted", status="unknown")
write (10) 'a'
write (10) 'c'
a = 'b'
rewind 10
read (10, err=20, iomsg=msg) a
call abort
20 continue
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
close (10, status="delete")
end program main