This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with recompute_tree_invarant_for_addr_expr


On Mon, Jun 13, 2005 at 07:39:33PM +0200, Zdenek Dvorak wrote:
> This has a small flaw -- in case NODE has variable size, it gets
> allocated on stack dynamically, it may be allocated and deallocated
> several times, and its address is no longer an invariant.
> 
> So I tried to fix the code as follows:
> 
> if (decl_function_context (node) == current_function_decl
>     && TREE_CONSTANT (DECL_SIZE (node))
>   ... /* set TREE_INVARIANT  */

Such nodes should never be seen having their address taken.  They
should be completely removed during gimplification.  So I think we
should stop here and figure out why you care about such nodes.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]