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 }
|
! pr18364 endfile does not truncate file.
|
! pr18364 endfile does not truncate file.
|
! write out 20 records
|
! write out 20 records
|
! rewind
|
! rewind
|
! read 10 records
|
! read 10 records
|
! endfile
|
! endfile
|
! close file
|
! close file
|
! open file
|
! open file
|
! detect file has only 10 records
|
! detect file has only 10 records
|
implicit none
|
implicit none
|
integer i,j
|
integer i,j
|
open(unit=10,file='test.dat',access='sequential',status='replace')
|
open(unit=10,file='test.dat',access='sequential',status='replace')
|
do i=1, 20
|
do i=1, 20
|
write (10,'(I4)') i
|
write (10,'(I4)') i
|
end do
|
end do
|
rewind(10)
|
rewind(10)
|
do i=1,10
|
do i=1,10
|
read (10,'(I4)') j
|
read (10,'(I4)') j
|
end do
|
end do
|
endfile(10)
|
endfile(10)
|
close(10)
|
close(10)
|
open(unit=10,file='test.dat',access='sequential',status='old')
|
open(unit=10,file='test.dat',access='sequential',status='old')
|
do i=1,20
|
do i=1,20
|
read (10,'(I4)',end=99) j
|
read (10,'(I4)',end=99) j
|
end do
|
end do
|
! should never get here
|
! should never get here
|
call abort
|
call abort
|
99 continue ! end of file
|
99 continue ! end of file
|
if (j.ne.10) call abort
|
if (j.ne.10) call abort
|
close(10,status='delete')
|
close(10,status='delete')
|
end
|
end
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.