diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-11-14 01:22:17 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2007-11-14 01:22:17 +0000 |
commit | 68c2aa7d954346734ca37449a64f312798b40ad0 (patch) | |
tree | 589fec827fb22ddc9736721579a66d36720bb3c7 /gcc | |
parent | 0aeaf89a2a603defe954c6194cd88520511d6324 (diff) | |
download | gcc-68c2aa7d954346734ca37449a64f312798b40ad0.zip gcc-68c2aa7d954346734ca37449a64f312798b40ad0.tar.gz gcc-68c2aa7d954346734ca37449a64f312798b40ad0.tar.bz2 |
re PR libfortran/33985 (access="stream",form="unformatted" doesn't buffer)
2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33985
*gfortran.dg/streamio_12.f90: New test to avoid future regression.
From-SVN: r130172
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/streamio_12.f90 | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4a5a0a6..77eeb17 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org> + PR fortran/33985 + *gfortran.dg/streamio_12.f90: New test to avoid future regression. + +2007-11-13 Jerry DeLisle <jvdelisle@gcc.gnu.org> + *gfortran.dg/list_read_7.f90: Fix test so that test file is deleted when done. diff --git a/gcc/testsuite/gfortran.dg/streamio_12.f90 b/gcc/testsuite/gfortran.dg/streamio_12.f90 new file mode 100644 index 0000000..0b0d678 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/streamio_12.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! PR33985 Stream IO test with empty write, array writes, and reads. +program streamtest + implicit none + character(1) :: lf = char(10) + character(1) :: tchar + integer :: i,j,k + real(kind=4), dimension(100,100) :: anarray + open(10, file="teststream", access="stream", form="unformatted") + anarray = 3.14159 + write(10) anarray + write(10, pos=1) ! This is a way to position an unformatted file + anarray = 0.0 + read(10) anarray + anarray = abs(anarray - 3.14159) + if (any(anarray.gt.0.00001)) call abort() + close(10,status="delete") +end program streamtest
\ No newline at end of file |