https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91413

--- Comment #3 from Janne Blomqvist <jb at gcc dot gnu.org> ---
Author: jb
Date: Sun Aug 11 09:42:41 2019
New Revision: 274264

URL: https://gcc.gnu.org/viewcvs?rev=274264&root=gcc&view=rev
Log:
PR fortran/91413 Generate warning when making array static

When moving a local variable from the stack to static storage, the
procedure is no longer safe to be called recursively or concurrently
from multiple threads.  Thus generate a warning when this is done.
Also double the default limit for switching from stack to static.

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2019-08-11  Janne Blomqvist  <j...@gcc.gnu.org>

        PR fortran/91413
        * invoke.texi (-fmax-stack-var-size): Document increased default.
        * options.c (gfc_post_options): Increase default stack var size to
        65536 bytes.
        * trans-decl.c (gfc_finish_var_decl): Generate warning when local
        array moved to static storage.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/trans-decl.c

Reply via email to