https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78387
--- Comment #5 from Andrew Benson <abensonca at gmail dot com> --- I couldn't find anything in the OpenMP specifications which addresses this issue - so presumably it's undefined behavior as far as OpenMP is concerned. But it seems that internal file writes were intended to be thread safe in gfortran - am I correct in understanding that? From what I can tell Intel fortran also makes internal file writes thread safe, for what it's worth.