summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-27 12:33:52 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2007-12-27 12:33:52 +0000
commitd5bf8d02e7b67de803855bed4366a15a026b380a (patch)
treeb4645f03a52732367009cbd99e723a955e047126 /libgfortran/runtime
parent8237872e2a633a4ccf4a6291dd67becf4ffc2ab9 (diff)
downloadgcc-d5bf8d02e7b67de803855bed4366a15a026b380a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/error.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 279e26518ea..f0a4ff2291d 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;