[Bug fortran/90230] newunit in open function is not threadsafe with openmp
jb at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 29 06:33:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90230
Janne Blomqvist <jb at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jb at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #1 from Janne Blomqvist <jb at gcc dot gnu.org> ---
It's not a thread-safety issue. If you uncomment the line
close(lun)
you get the same error message also without OpenMP. The reason is that
GFortran follows the Fortran standard which says that you may not open the same
file on multiple units.
That being said, Fortran 2018 removes that restriction, so future versions of
GFortran may behave differently.
More information about the Gcc-bugs
mailing list