2008-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 Jan 2008 16:12:00 +0000 (16:12 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 Jan 2008 16:12:00 +0000 (16:12 +0000)
PR libfortran/34676
* gfortran.dg/list_read_8.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131338 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/list_read_8.f90 [new file with mode: 0644]

index a8cdbf7..b4b415a 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/34676
+       * gfortran.dg/list_read_8.f90: New test.
+
 2008-01-04  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/34029
diff --git a/gcc/testsuite/gfortran.dg/list_read_8.f90 b/gcc/testsuite/gfortran.dg/list_read_8.f90
new file mode 100644 (file)
index 0000000..4be75fd
--- /dev/null
@@ -0,0 +1,17 @@
+! { dg-do run }
+! PR34676 IO error delayed
+! Test case from PR modified by <jvdelisle@gcc.gnu.org>
+implicit none
+integer::i,badness
+character::c
+open(unit=10,status="scratch")
+write(10,'(a)') '1'
+write(10,'(a)') '2'
+write(10,'(a)') '3'
+rewind(10)
+do i=1,10
+  read(10,*,iostat=badness)
+  if (badness/=0) exit
+enddo
+if (i /= 4) call abort
+end