This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67493] -fcheck=recursive not thread aware
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 07 Aug 2017 17:37:30 +0000
- Subject: [Bug fortran/67493] -fcheck=recursive not thread aware
- Auto-submitted: auto-generated
- References: <bug-67493-4@http.gcc.gnu.org/bugzilla/>
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.