summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-24 12:30:17 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-24 12:30:17 +0000
commit470f41be4dfcbb0d7ece5c2d97b9ab387c20f481 (patch)
tree65337269726fdfa1a1b843f27d9a4a80426a48a9 /gcc/testsuite
parent88904b3b9adaf165ce7325a4c5f4a16d3678ac61 (diff)
downloadgcc-470f41be4dfcbb0d7ece5c2d97b9ab387c20f481.tar.gz
2009-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/39528 * gfortran.dg/read_repeat.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145031 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/read_repeat.f9024
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 196a040acfe..ee3a159cdf8 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 00000000000..192ebe81ffb
--- /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