aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2007-12-11 03:56:05 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2007-12-11 03:56:05 +0000
commit424cc6dcf439a3dd48cbc74335b47421ebf2d8fb (patch)
tree7a3471ae5ec856fadaa8d2b18c03d72f3cb6d261
parent5f026f90f02bf603474d4c81f80b2cb7043d8d90 (diff)
downloadgcc-424cc6dcf439a3dd48cbc74335b47421ebf2d8fb.zip
gcc-424cc6dcf439a3dd48cbc74335b47421ebf2d8fb.tar.gz
gcc-424cc6dcf439a3dd48cbc74335b47421ebf2d8fb.tar.bz2
re PR fortran/34411 (hang-up during read of non-expected input)
2007-12-10 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/34411 * gfortran.dg/error_recovery_5.f90: New. * gfortran.dg/optional_dim_2.f90: Fix test, not related to this PR. From-SVN: r130768
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/error_recovery_5.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/optional_dim_2.f902
3 files changed, 37 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4774d30..9311821 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/34411
+ * gfortran.dg/error_recovery_5.f90: New.
+ * gfortran.dg/optional_dim_2.f90: Fix test, not related to this PR.
+
2007-12-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/34371
diff --git a/gcc/testsuite/gfortran.dg/error_recovery_5.f90 b/gcc/testsuite/gfortran.dg/error_recovery_5.f90
new file mode 100644
index 0000000..88acf93
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/error_recovery_5.f90
@@ -0,0 +1,30 @@
+! { dg-do run }
+! PR34411 hang-up during read of non-expected input
+! Test case derived from that given in PR
+! Prior to patch, the do loop was infinite, limits set in this one
+program pr34411
+ real :: x,y
+ ii = 0
+ iostat = 0
+ x = 0.0; y= 0.0
+ open (10, status="scratch")
+ write (10, '(a)')" 289 329.142 214.107 12.313 12.050 11.913 11.868"
+ write (10, '(a)')" 2038.497 99.99 0.00 0.019 0.021 0.025 0.034"
+ write (10, '(a)')""
+ write (10, '(a)')" 413 360.334 245.261 12.375 11.910 11.469 11.086"
+ write (10, '(a)')" 2596.395 99.99 0.00 0.019 0.017 0.016 0.015"
+ write (10, '(a)')""
+ write (10, '(a)')" 655 332.704 317.964 12.523 12.212 11.998 11.892"
+ write (10, '(a)')" 1627.586 99.99 0.00 0.005 0.005 0.006 0.007"
+ write (10, '(a)')""
+ write (10, '(a)')" 360 379.769 231.226 12.709 12.422 12.195 11.941"
+ write (10, '(a)')" 2561.539 99.99 0.00 0.042 0.043 0.050 0.055"
+ rewind 10
+ do i = 1,100
+ read(10,'(T7,2F9.3)', iostat=ii, end=666) x,y
+ end do
+666 continue
+ if (i /= 12) call abort
+ if (x /= 379.76901 .and. y /= 231.22600) call abort
+ close(10)
+end program pr34411
diff --git a/gcc/testsuite/gfortran.dg/optional_dim_2.f90 b/gcc/testsuite/gfortran.dg/optional_dim_2.f90
index bb25201..41cbbf5 100644
--- a/gcc/testsuite/gfortran.dg/optional_dim_2.f90
+++ b/gcc/testsuite/gfortran.dg/optional_dim_2.f90
@@ -19,6 +19,6 @@ contains
lotto = eoshift((/.true.,.true.,.true.,.true./),1,boundary=bound,dim=dimmy)
lotto = eoshift(lotto,1,dim=dimmy)
write(testbuf,*) lotto
- if (trim(testbuf).ne." T T F F") print *, testbuf
+ if (trim(testbuf).ne." T T F F") call abort
end subroutine
end program test \ No newline at end of file