re PR fortran/29563 (Internal read loses data.)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Oct 2006 04:41:55 +0000 (04:41 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 26 Oct 2006 04:41:55 +0000 (04:41 +0000)
2006-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/29563
* gfortran.dg/arrayio_9.f90: New test.

From-SVN: r118060

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/arrayio_9.f90 [new file with mode: 0644]

index c9d9df92a916ca4b3645fa69f90ab139f7fff17e..5f1cbf79c79715c07888566daf746b4de030d94f 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/29563
+       * gfortran.dg/arrayio_9.f90: New test.
+
 2006-10-26  Ben Elliston  <bje@au.ibm.com>
 
        * gcc.c-torture/execute/builtins/strlen.c: Do not use strcpy.
diff --git a/gcc/testsuite/gfortran.dg/arrayio_9.f90 b/gcc/testsuite/gfortran.dg/arrayio_9.f90
new file mode 100644 (file)
index 0000000..cbe0cc0
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do run }
+! PR29563 Internal read loses data.
+! Test from test case submitted by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+! Without patch, last value in array was being skipped in the read.
+program pr29563
+  character(len=10), dimension(3)::arraydata = (/' 1 2 3',' 4 5 6',' 7 8 9'/)
+  real(kind=8), dimension(3,3) :: tmp
+  read(arraydata,'(3(3f2.0/))',iostat=iostat)((tmp(i,j),j=1,3),i=1,3)
+  if (tmp(3,3)-9.0.gt.0.0000001) print *, "abort"
+end program pr29563
\ No newline at end of file