diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index daa90ea3fdb7..ca119ddc8c49 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-12-28 Jerry DeLisle + + PR libgfortran/25550 + * gfortran.dg/endfile.f: New test. + 2005-12-28 Jerry DeLisle PR libgfortran/25419 diff --git a/gcc/testsuite/gfortran.dg/endfile.f b/gcc/testsuite/gfortran.dg/endfile.f new file mode 100644 index 000000000000..6ece5459fa36 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/endfile.f @@ -0,0 +1,18 @@ +! { dg-do run } +! PR25550 file data corrupted after reading end of file. +! Derived from example given in PR from Dale Ranta. +! Contributed by Jerry DeLisle + integer data + data=-1 + open(unit=11,status='scratch',form='unformatted') + write(11)data + read(11,end=1000 )data + call abort() + 1000 continue + rewind (11) + read(11)data + 1001 continue + if(data.ne.-1) call abort + end + +