This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Making a variable addressable in GIMPLE
- From: Diego Novillo <dnovillo at redhat dot com>
- To: etsman at cs dot huji dot ac dot il
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 27 Jan 2006 08:28:53 -0500
- Subject: Re: Making a variable addressable in GIMPLE
- References: <43D9F334.5000509@gmail.com>
Yoav Etsion wrote:
> The problem is that the first mudflap pass takes place at the GIMPLE
> level, at which point all variables have their
> addressable/non-addressable attributes set, which forbids me to build an
> ADDR_EXPR node for a non-addressable pointer variable ("invalid operand
> to unary & operator" error).
>
Call build_addr() to create the ADDR_EXPR. It will set the
TREE_ADDRESSABLE bit on the variable and set some attributes on the
ADDR_EXPR itself.
That message suggest that you may be trying to build the address of a
non-decl, though. Show me the code and an example of your transformation?