This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Removing redundant loads
- From: law at redhat dot com
- To: Jason Merrill <jason at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 May 2003 18:34:45 -0600
- Subject: Re: [tree-ssa] Removing redundant loads
- Reply-to: law at redhat dot com
In message <wvln0h40yjy.fsf@prospero.boston.redhat.com>, Jason Merrill writes:
>> For example, if you pass it this tree for both operands, you'll get a
>> false back from operand_b because this expression has tree_side_effects
>> set.
>
>Why does that expression have TREE_SIDE_EFFECTS set?
Because we unconditionally set TREE_SIDE_EFFECTS on STMT_EXPRs. That
gets propagated up to the COMPONENT_REFs.
The testcase for the code in question looks something like:
struct tree_decl
{
unsigned in_system_header_flag:1;
};
union tree_node
{
struct tree_decl decl;
};
typedef union tree_node *tree;
static int
redeclaration_error_message (olddecl)
tree olddecl;
{
if (({olddecl;})->decl.in_system_header_flag)
;
}