aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2007-12-27 12:33:52 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2007-12-27 12:33:52 +0000
commitceac3d59adc0d45bbb067ac86c493930cb1839ee (patch)
treeb4645f03a52732367009cbd99e723a955e047126 /gcc
parentedbf8b16980a483c70cce6fc94401ec6936a9789 (diff)
downloadgcc-ceac3d59adc0d45bbb067ac86c493930cb1839ee.zip
gcc-ceac3d59adc0d45bbb067ac86c493930cb1839ee.tar.gz
gcc-ceac3d59adc0d45bbb067ac86c493930cb1839ee.tar.bz2
re PR fortran/34594 (On error and END, no jump to ERR=<label>)
2007-12-27 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34594 * runtime/error.c: If there was a previous error, don't mask it with another error mesage, EOF or EOR condition. 2007-12-27 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/34594 * gfortran.dg/direct_io_8.f90: New test case. From-SVN: r131199
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/direct_io_8.f9025
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6f3fc35..dd87ad9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-27 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR libfortran/34594
+ * gfortran.dg/direct_io_8.f90: New test case.
+
2007-12-27 Jakub Jelinek <jakub@redhat.com>
PR target/34281
diff --git a/gcc/testsuite/gfortran.dg/direct_io_8.f90 b/gcc/testsuite/gfortran.dg/direct_io_8.f90
new file mode 100644
index 0000000..5e384a1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/direct_io_8.f90
@@ -0,0 +1,25 @@
+! { dg-do run }
+! PR 34594 - this used to give runtime errors due to an
+! end condition.
+program main
+ implicit none
+ integer :: iou, i, ir, TEMP_CHANGES
+ i=44
+ ir = -42
+
+ open(11,file="foo.dat")
+ ! Try a direct access read on a formatted sequential rile
+ READ (11, REC = I, ERR = 99) TEMP_CHANGES
+ call abort
+99 continue
+ ! Variant 2: ir is ok, but does not jump to 99
+ READ (11, REC = I, IOSTAT = IR, ERR = 98) TEMP_CHANGES
+ call abort
+
+98 continue
+ if(ir == 0) then
+ call abort
+ end if
+ close(11,status="delete")
+end program main
+