aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2020-05-23 19:01:43 +0200
committerThomas Koenig <tkoenig@gcc.gnu.org>2020-05-23 19:01:43 +0200
commit8df7ee67f6fdc780e9453f2baa8d1bf62c000761 (patch)
tree015a612d02b3a3e1cfc3b9ee97c08d8643d8e5a8 /libgfortran/runtime
parent584d52b088f9fcf78704b504c3f1f07e17c1cded (diff)
downloadgcc-8df7ee67f6fdc780e9453f2baa8d1bf62c000761.zip
gcc-8df7ee67f6fdc780e9453f2baa8d1bf62c000761.tar.gz
gcc-8df7ee67f6fdc780e9453f2baa8d1bf62c000761.tar.bz2
Fixes a hang on an invalid ID in a WAIT statement.
gcc/fortran/ChangeLog: 2020-05-23 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/95191 * libgfortran.h (libgfortran_error_codes): Add LIBERROR_BAD_WAIT_ID. libgfortran/ChangeLog: 2020-05-23 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/95191 * io/async.c (async_wait_id): Generate error if ID is higher than the highest current ID. * runtime/error.c (translate_error): Handle LIBERROR_BAD_WAIT_ID. libgomp/ChangeLog: 2020-05-23 Thomas Koenig <tkoenig@gcc.gnu.org> PR libfortran/95191 * testsuite/libgomp.fortran/async_io_9.f90: New test.
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/error.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgfortran/runtime/error.c b/libgfortran/runtime/error.c
index 9ed5d56..ff6b852 100644
--- a/libgfortran/runtime/error.c
+++ b/libgfortran/runtime/error.c
@@ -660,6 +660,10 @@ translate_error (int code)
p = "Inquire statement identifies an internal file";
break;
+ case LIBERROR_BAD_WAIT_ID:
+ p = "Bad ID in WAIT statement";
+ break;
+
default:
p = "Unknown error code";
break;