https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95191
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Thomas Kथà¤nig <tkoe...@gcc.gnu.org>: https://gcc.gnu.org/g:3633bc27f5925394ccc5dd56bb1c65b4d88b42c0 commit r10-8187-g3633bc27f5925394ccc5dd56bb1c65b4d88b42c0 Author: Thomas Koenig <tkoe...@gcc.gnu.org> Date: Sat May 23 19:01:43 2020 +0200 Fixes a hang on an invalid ID in a WAIT statement. gcc/fortran/ChangeLog: 2020-05-23 Thomas Koenig <tkoe...@gcc.gnu.org> PR libfortran/95191 * libgfortran.h (libgfortran_error_codes): Add LIBERROR_BAD_WAIT_ID. libgfortran/ChangeLog: 2020-05-23 Thomas Koenig <tkoe...@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 <tkoe...@gcc.gnu.org> PR libfortran/95191 * testsuite/libgomp.fortran/async_io_9.f90: New test. (cherry picked from commit 8df7ee67f6fdc780e9453f2baa8d1bf62c000761)