Patchwork build_function_call and TREE_ADDRESSABLE

login
register
mail settings
Submitter Alan Modra
Date March 4, 2011, 4:58 a.m.
Message ID <20110304045856.GY13094@bubble.grove.modra.org>
Download mbox | patch
Permalink /patch/85369/
State New
Headers show

Comments

Alan Modra - March 4, 2011, 4:58 a.m.
Warn off anyone trying to do as I did, and the bit about inlines is
no longer relevant.  OK to apply?

	* tree.h (TREE_ADDRESSABLE): Note that direct calls set the
	flag on FUNCTION_DECLs.
Richard Guenther - March 4, 2011, 10:16 a.m.
On Fri, Mar 4, 2011 at 5:58 AM, Alan Modra <amodra@gmail.com> wrote:
> Warn off anyone trying to do as I did, and the bit about inlines is
> no longer relevant.  OK to apply?
>
>        * tree.h (TREE_ADDRESSABLE): Note that direct calls set the
>        flag on FUNCTION_DECLs.
>
> Index: gcc/tree.h
> ===================================================================
> --- gcc/tree.h  (revision 170665)
> +++ gcc/tree.h  (working copy)
> @@ -1106,8 +1106,8 @@ extern void omp_clause_range_check_faile
>
>  /* In VAR_DECL, PARM_DECL and RESULT_DECL nodes, nonzero means address
>    of this is needed.  So it cannot be in a register.
> -   In a FUNCTION_DECL, nonzero means its address is needed.
> -   So it must be compiled even if it is an inline function.
> +   In a FUNCTION_DECL, nonzero means its address is needed.  This even
> +   happens on a direct call, making the flag fairly useless.
>    In CONSTRUCTOR nodes, it means object constructed must be in memory.
>    In LABEL_DECL nodes, it means a goto for this label has been seen
>    from a place outside all binding contours that restore stack levels.

Rather 'In a FUNCTION_DECL, it has no meaning.'

Ok with that change.
Richard.

> --
> Alan Modra
> Australia Development Lab, IBM
>

Patch

Index: gcc/tree.h
===================================================================
--- gcc/tree.h	(revision 170665)
+++ gcc/tree.h	(working copy)
@@ -1106,8 +1106,8 @@  extern void omp_clause_range_check_faile
 
 /* In VAR_DECL, PARM_DECL and RESULT_DECL nodes, nonzero means address
    of this is needed.  So it cannot be in a register.
-   In a FUNCTION_DECL, nonzero means its address is needed.
-   So it must be compiled even if it is an inline function.
+   In a FUNCTION_DECL, nonzero means its address is needed.  This even
+   happens on a direct call, making the flag fairly useless.
    In CONSTRUCTOR nodes, it means object constructed must be in memory.
    In LABEL_DECL nodes, it means a goto for this label has been seen
    from a place outside all binding contours that restore stack levels.