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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #12 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Regarding the message:

Warning: Array ‘a’ at (1) is larger than limit set by ‘-fmax-stack-var-size=’,
moved from stack to static storage. This makes the procedure unsafe when called
recursively, or concurrently from multiple threads. Consider using
‘-frecursive’, or increase the ‘-fmax-stack-var-size=’ limit, or change the
code to use an ALLOCATABLE array. [-Wsurprising]

The -frecursive flag is fine - but highly misleading, until reading the
gfortran manual.
I think the last sentence should be something like:

"Consider increasing the ‘-fmax-stack-var-size=’ limit (or use -frecursive,
which implies unlimited -fmax-stack-var-size) - or change the code to use an
ALLOCATABLE array. If the variable is never accessed concurrently, this warning
can be ignored; in this case, the variable could also be declared with the SAVE
attribute."

Or differently worded - but -frecursive needs some explanation in the message.

Reply via email to