This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] fix PR middle-end/17885, gimplifing of volatile &a->b
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jason at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Oct 04 15:58:01 EDT
- Subject: Re: [PATCH] fix PR middle-end/17885, gimplifing of volatile &a->b
I think that should still be the general case; if we're taking the address
of, say, a struct returned from a function, we want to propagate
TREE_SIDE_EFFECTS from the call to the ADDR_EXPR.
I wonder if the problem isn't here:
if (TREE_CODE (node) == INDIRECT_REF)
/* If this is &((T*)0)->field, then this is a form of addition. */
if (TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST)
Shouldn't that last "node" be TREE_OPERAND (node, 0)? We don't care about
the INDIRECT_REF here: all we care about is its operand.