https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95191
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Thomas Kथà¤nig <tkoe...@gcc.gnu.org>: https://gcc.gnu.org/g:8df7ee67f6fdc780e9453f2baa8d1bf62c000761 commit r11-588-g8df7ee67f6fdc780e9453f2baa8d1bf62c000761 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.