aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-11-14 01:22:17 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-11-14 01:22:17 +0000
commit68c2aa7d954346734ca37449a64f312798b40ad0 (patch)
tree589fec827fb22ddc9736721579a66d36720bb3c7 /gcc
parent0aeaf89a2a603defe954c6194cd88520511d6324 (diff)
downloadgcc-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/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/streamio_12.f9018
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