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: build_fold_addr_expr breaks verify_stmt


On Thu, Aug 7, 2008 at 4:55 PM, Martin Schindewolf <schindew@ira.uka.de> wrote:
> Dear GCC-Developers,
>
> I am currently experiencing two problems (which seem related).
>
> (1) I wrote a pass that works after the gimplification is
> completed and amongst other things does the following:
> It passes the address of a variable to a function. To pass
> the address I use the build_fold_addr_expr which takes the
> address and seems to work quite well.
> The problem now occurs when the variable is used after the
> function call. Since the variable is used in a binary
> expression, the compiler complains about the following:
>
> error: invalid operand to binary operator
> m
> file.c: internal compiler error: verify_stmts failed

You need to replace all uses of the former(!) register variable
by a load into a register and a use of that new register.  This
is because by taking the address of the variable you made
the variable no longer be a register.

In general doing what you do after gimplification is not a good idea.

Richard.


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