re PR fortran/29563 (Internal read loses data.)
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. From-SVN: r118064
This commit is contained in:
parent
bbd6c8aa76
commit
9a3da65a38
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2006-10-26 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||||
|
|
||||||
* gcc.dg/20061026.c: New testcase.
|
* gcc.dg/20061026.c: New testcase.
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
! { 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
|
|
@ -1,10 +1,11 @@
|
||||||
! { dg-do run }
|
! { dg-do run }
|
||||||
! PR29563 Internal read loses data.
|
! 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.
|
! Without patch, last value in array was being skipped in the read.
|
||||||
program pr29563
|
program pr29563
|
||||||
character(len=10), dimension(3)::arraydata = (/' 1 2 3',' 4 5 6',' 7 8 9'/)
|
character(len=10), dimension(3)::arraydata = (/' 1 2 3',' 4 5 6',' 7 8 9'/)
|
||||||
real(kind=8), dimension(3,3) :: tmp
|
real(kind=8), dimension(3,3) :: tmp
|
||||||
read(arraydata,'(3(3f2.0/))',iostat=iostat)((tmp(i,j),j=1,3),i=1,3)
|
tmp = 0.0
|
||||||
if (tmp(3,3)-9.0.gt.0.0000001) print *, "abort"
|
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
|
end program pr29563
|
Loading…
Reference in New Issue