re PR fortran/44477 (Sequential I/O with END FILE: File position should be at EoF)

2010-06-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/44477
	* gfortran.dg/eof_3.f90
	* gfortran.dg/endfile_2.f90
	* gfortran.dg/endfile_4.f90
	* gfortran.dg/endfile_3.f90

From-SVN: r161021
This commit is contained in:
Jerry DeLisle 2010-06-19 01:05:05 +00:00
parent b9983d610a
commit 53ff31ad04
5 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2010-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/44477
* gfortran.dg/eof_3.f90
* gfortran.dg/endfile_2.f90
* gfortran.dg/endfile_4.f90
* gfortran.dg/endfile_3.f90
2010-06-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR c++/41090

View File

@ -5,7 +5,7 @@
integer i
endfile(8)
rewind(8)
read(8,end=0023)i
read(8,*,end=0023)i
call abort ! should never get here
stop
0023 continue

View File

@ -0,0 +1,9 @@
! { dg-do run }
! pr44477 READ/WRITE not allowed after ENDFILE
!-------------------------------------------
open(10, form='formatted', &
action='write', position='rewind', status="scratch")
endfile(10)
write(10,'(a)') "aa" ! { dg-shouldfail "Cannot perform ENDFILE" }
end

View File

@ -0,0 +1,8 @@
! { dg-do run }
! pr44477 ENDFILE not allowed after ENDFILE
!-------------------------------------------
open(10, form='formatted', &
action='write', position='rewind', status="scratch")
endfile(10)
endfile(10) ! { dg-shouldfail "Cannot perform ENDFILE" }
end

View File

@ -4,5 +4,6 @@ program test
open(unit=32,status="scratch",access="sequential",form="unformatted")
read(32,end=100)
100 continue
backspace(32)
write (32)
end program test