re PR fortran/31366 ([4.2 only] Last record truncated for read after short write, direct access file)

2007-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/31366
	* gfortran.dg/direct_io_6.f90: New test.

From-SVN: r123941
This commit is contained in:
Jerry DeLisle
2007-04-18 04:37:12 +00:00
parent 89e6efff8a
commit 53dbde5743
2 changed files with 21 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2007-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31366
* gfortran.dg/direct_io_6.f90: New test.
2007-04-17 Simon Martin <simartin@users.sourceforge.net>
PR c++/31517

View File

@@ -0,0 +1,16 @@
! { dg-do run }
! pr31366 last record truncated for read after short write, direct access file.
! test case derived from pr, submitted by jerry delisle <jvdelisle@gcc.gnu.org
program test
character(len=8) :: as_written, as_read
character(1) :: byte
as_written = "12345678"
open (76, access="direct", recl=12, status="scratch")
write(76, rec=1) as_written
write(76, rec=2) as_written
read(76, rec=1) as_read, byte, byte, byte, byte
read(76, rec=2, err=3) as_read, byte, byte, byte, byte
stop
3 call abort()
end program test