diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/arrayio_10.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/arrayio_10.f90 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/arrayio_10.f90 b/gcc/testsuite/gfortran.dg/arrayio_10.f90 new file mode 100644 index 000000000..2be99ec72 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/arrayio_10.f90 @@ -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
\ No newline at end of file |