diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2007-12-27 12:33:52 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2007-12-27 12:33:52 +0000 |
commit | ceac3d59adc0d45bbb067ac86c493930cb1839ee (patch) | |
tree | b4645f03a52732367009cbd99e723a955e047126 /libgfortran | |
parent | edbf8b16980a483c70cce6fc94401ec6936a9789 (diff) | |
download | gcc-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 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/runtime/error.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 495d536..f7d260d 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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-25 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/34560 diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c index 279e265..f0a4ff2 100644 --- a/libgfortran/runtime/error.c +++ b/libgfortran/runtime/error.c @@ -410,6 +410,13 @@ translate_error (int code) void generate_error (st_parameter_common *cmp, int family, const char *message) { + + /* If there was a previous error, don't mask it with another + error message, EOF or EOR condition. */ + + if ((cmp->flags & IOPARM_LIBRETURN_MASK) == IOPARM_LIBRETURN_ERROR) + return; + /* Set the error status. */ if ((cmp->flags & IOPARM_HAS_IOSTAT)) *cmp->iostat = (family == LIBERROR_OS) ? errno : family; |