mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
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:
@@ -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
|
||||
|
||||
16
gcc/testsuite/gfortran.dg/direct_io_6.f90
Normal file
16
gcc/testsuite/gfortran.dg/direct_io_6.f90
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user