* gfortran.dg/PR19872.f: New test.

From-SVN: r97938
This commit is contained in:
Steven G. Kargl 2005-04-10 03:46:22 +00:00
parent 48248fa771
commit f7d7d3b779
2 changed files with 27 additions and 2 deletions

View File

@ -1,8 +1,13 @@
2005--4-09 Steven G. Kargl <kargls@comcast.net>
2005-04-09 Bud Davis <bdavis@gfortran.org>
Steven G. Kargl <kargls@comcast.net>
* gfortran.dg/PR19872.f: New test.
2005-04-09 Steven G. Kargl <kargls@comcast.net>
* gfortran.dg/nint_1.f90: Fix dg-do directive
2005--4-09 Steven G. Kargl <kargls@comcast.net>
2005-04-09 Steven G. Kargl <kargls@comcast.net>
* gfortran.dg/nint_1.f90: New test.

View File

@ -0,0 +1,20 @@
! { dg-do run }
! PR 19872 - closed and re-opened file not overwriten
implicit none
integer i(4)
data i / 4 * 0 /
open(1,form='FORMATTED',status='UNKNOWN')
write(1,'("1 2 3 4 5 6 7 8 9")')
close(1)
open(1,form='FORMATTED')
write(1,'("9 8 7 6")')
close(1)
open(1,form='FORMATTED')
read(1,*)i
if(i(1).ne.9.and.i(2).ne.8.and.i(3).ne.7.and.i(4).ne.9)call abort
read(1,*,end=200)i
! should only be able to read one line from the file
call abort
200 continue
close(1,STATUS='DELETE')
end