This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: max-stack-var-size
On Friday 07 November 2003 7:58 am, canqun@nudt.edu.cn wrote:
> It seems that recursive function is the only case that
> its local variables should be placed on stack. Is it
> true? If so, add an extra condition to avoid such case
> will let it work.
>
> + /* Keep variables larger than max-stack-var-size
> off stack. */
> + if (!(sym->ns->proc_name->attr.recursive)
> && !gfc_can_put_var_on_stack (DECL_SIZE_UNIT
> (decl)))
> + TREE_STATIC (decl) = 1;
This would be fine, preferably accompanied by a testcase.
Paul