Hi,
On Fri, 12 Apr 2019, Richard Biener wrote:
> @@ -332,6 +337,24 @@ struct obstack final_solutions_obstack;
> Indexed directly by variable info id. */
> static vec<varinfo_t> varmap;
>
> +/* Return whether VAR is an automatic variable. */
> +
> +static bool
> +auto_var_p (const_tree var)
> +{
> + if (VAR_P (var))
> + {
> + tree context = DECL_CONTEXT (var);
> + if (context
> + && TREE_CODE (context) == FUNCTION_DECL
> + && ! DECL_EXTERNAL (var)
> + && ! TREE_STATIC (var))
> + return true;
> + }
> + return false;
> +}
You miss PARM_DECLs and RESULT_DECLs, i.e. it's probably better to factor
out tree.c:auto_var_in_fn_p and place the new auto_var_p in tree.c as
well.
Ciao,
Michael.