diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-03-24 12:30:17 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-03-24 12:30:17 +0000 |
commit | 760ab26f43c765e730450a7fdfafdbcc0866617e (patch) | |
tree | 65337269726fdfa1a1b843f27d9a4a80426a48a9 /gcc | |
parent | b710b6bc87e76ca14deb301997af288716f44960 (diff) | |
download | gcc-760ab26f43c765e730450a7fdfafdbcc0866617e.zip gcc-760ab26f43c765e730450a7fdfafdbcc0866617e.tar.gz gcc-760ab26f43c765e730450a7fdfafdbcc0866617e.tar.bz2 |
re PR fortran/39528 (repeated entries are not read when using list-directed input)
2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/39528
* gfortran.dg/read_repeat.f90: New test.
From-SVN: r145031
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/read_repeat.f90 | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 196a040..ee3a159c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libfortran/39528 + * gfortran.dg/read_repeat.f90: New test. + 2009-03-24 Ira Rosen <irar@il.ibm.com> PR tree-optimization/39529 diff --git a/gcc/testsuite/gfortran.dg/read_repeat.f90 b/gcc/testsuite/gfortran.dg/read_repeat.f90 new file mode 100644 index 0000000..192ebe81f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/read_repeat.f90 @@ -0,0 +1,24 @@ +! { dg-do run } +! PR39528 repeated entries not read when using list-directed input. +! Test case derived from reporters example. +program rread + implicit none + integer :: iarr(1:7), ia, ib, i + + iarr = 0 + + write(10,*) " 2*1 3*2 /" + write(10,*) " 12" + write(10,*) " 13" + rewind(10) + + read(10,*) (iarr(i), i=1,7) + read(10,*) ia, ib + + if (any(iarr(1:2).ne.1)) call abort + if (any(iarr(3:5).ne.2)) call abort + if (any(iarr(6:7).ne.0)) call abort + if (ia .ne. 12 .or. ib .ne. 13) call abort + + close(10, status="delete") +end program rread |