diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2019-08-11 12:42:41 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2019-08-11 12:42:41 +0300 |
commit | 543202079c79535652361818185ff534a0161a39 (patch) | |
tree | f56421276cff2b50b3afe7fe74fa112cf222c9be /gcc/fortran/options.c | |
parent | 4c9dbb967f3948630ae9cc79283c62e01399737f (diff) | |
download | gcc-543202079c79535652361818185ff534a0161a39.zip gcc-543202079c79535652361818185ff534a0161a39.tar.gz gcc-543202079c79535652361818185ff534a0161a39.tar.bz2 |
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 <jb@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.
From-SVN: r274264
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r-- | gcc/fortran/options.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index ef37ccc..146be2f 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -437,7 +437,7 @@ gfc_post_options (const char **pfilename) /* Set default. */ if (flag_max_stack_var_size == -2) - flag_max_stack_var_size = 32768; + flag_max_stack_var_size = 65536; /* Implement -fno-automatic as -fmax-stack-var-size=0. */ if (!flag_automatic) |