URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
! { dg-do run }
|
! { dg-do run }
|
! PR 26499 : Positioning of EOF after backspaces and write.
|
! PR 26499 : Positioning of EOF after backspaces and write.
|
! This test verifies that the last write truncates the file.
|
! This test verifies that the last write truncates the file.
|
! Submitted by Jerry DeLisle <jvdelisle@verizon.net>.
|
! Submitted by Jerry DeLisle <jvdelisle@verizon.net>.
|
program test
|
program test
|
integer at,eof
|
integer at,eof
|
dimension idata(5)
|
dimension idata(5)
|
open(unit=11,form='unformatted')
|
open(unit=11,form='unformatted')
|
write(11)idata
|
write(11)idata
|
write(11)idata
|
write(11)idata
|
write(11)idata
|
write(11)idata
|
backspace(11)
|
backspace(11)
|
backspace(11)
|
backspace(11)
|
write(11)idata
|
write(11)idata
|
close(11, status="keep")
|
close(11, status="keep")
|
open(unit=11,form='unformatted')
|
open(unit=11,form='unformatted')
|
rewind(11)
|
rewind(11)
|
read(11)idata
|
read(11)idata
|
read(11)idata
|
read(11)idata
|
read(11, end=250)idata
|
read(11, end=250)idata
|
call abort()
|
call abort()
|
250 continue
|
250 continue
|
close(11, status="delete")
|
close(11, status="delete")
|
end
|
end
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.