https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81195
--- Comment #10 from Jim Wilson <wilson at gcc dot gnu.org> --- Author: wilson Date: Mon Jun 26 21:44:50 2017 New Revision: 249668 URL: https://gcc.gnu.org/viewcvs?rev=249668&root=gcc&view=rev Log: Fix for SPEC CPu2017 621.wrf_s failure, add missing locking code. libgfortran/ Backport from trunk PR libfortran/81195 * io/unit.c (get_unit): Call __gthread_mutex_lock before newunit_stack and newunit_tos references. Call __gthread_mutex_unlock afterward. Modified: branches/gcc-7-branch/libgfortran/ChangeLog branches/gcc-7-branch/libgfortran/io/unit.c