https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67493
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |tkoenig at gcc dot gnu.org Resolution|--- |INVALID --- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- In this particular case, all variables are on the stack, so this is not a problem. However, even a PURE function could put an array into static storage, such as this example: $ gfortran -S -fdump-tree-original worker.f90 $ cat worker.f90.003t.original worker (integer(kind=4) & restrict n, integer(kind=4) & restrict sumn) { integer(kind=4) k; static integer(kind=4) x[10000]; *sumn = 0; [...] So, for thread-safety, better specify RECURSIVE.