Problem with recompute_tree_invarant_for_addr_expr
Richard Henderson
rth@redhat.com
Mon Jun 13 17:51:00 GMT 2005
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~
More information about the Gcc
mailing list