+2006-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/29563
+ * gfortran.dg/arrayio_9.f90: Update test.
+ * gfortran.dg/arrayio_19.f90: New test.
+
2006-10-26 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc.dg/20061026.c: New testcase.
--- /dev/null
+! { dg-do run }
+! PR29563 Internal read loses data.
+! Test case submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+! Without patch, values get muddled.
+program pr29563
+ character(len=4), dimension(3)::arraydata = (/'1123',' 456','789 '/)
+ real(kind=8), dimension(3) :: tmp
+ read(arraydata,*,iostat=iostat)tmp
+ if (tmp(1).ne.1123.0) call abort()
+ if (tmp(2).ne.456.0) call abort()
+ if (tmp(3).ne.789.0) call abort()
+end program pr29563
\ No newline at end of file
! { dg-do run }
! PR29563 Internal read loses data.
-! Test from test case submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
+! 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"
+ tmp = 0.0
+ read(arraydata,*,iostat=iostat)((tmp(i,j),j=1,3),i=1,3)
+ if (tmp(3,3)-9.0.gt.0.0000001) call abort()
end program pr29563
\ No newline at end of file