This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Nested functions
- From: Richard Henderson <rth at redhat dot com>
- To: law at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 May 2003 18:35:41 -0700
- Subject: Re: [tree-ssa] Nested functions
- References: <200305012225.h41MPSUV029833@speedy.slc.redhat.com>
On Thu, May 01, 2003 at 04:25:28PM -0600, firstname.lastname@example.org wrote:
> This means that when we find a nested function, we need to mark all
> variables at the same block nesting level as having a hidden use
> (since they may be used by the nested function). We must also mark
> all variables in the containing block nest as having a hidden use.
If you've merged up to
2003-04-18 Eric Botcazou <email@example.com>
* c-typeck.c (build_external_ref): Set the DECL_NONLOCAL flag
on VAR_DECL, PARM_DECL and FUNCTION_DECL from within
nested functions if they refer to declarations from parent functions.
* stmt.c (expand_decl): Don't put automatic variables in registers
if the DECL_NONLOCAL flag is set.
you can omit the hidden use for variables that don't
have DECL_NONLOCAL set.
> + for (decl = BLOCK_VARS (block); decl; decl = TREE_CHAIN (decl))
> + if (TREE_CODE (decl) == VAR_DECL)
> + set_has_hidden_use (decl);
Did you forget PARM_DECLs?