------- Comment #16 from rguenth at gcc dot gnu dot org 2009-06-10 21:29
-------
In which case the following will fix it (provided the C++ FE sets the
TREE_ADDRESSABLE flag)
Index: gimple.c
===================================================================
--- gimple.c (revision 148325)
+++ gimple.c (working copy)
@@ -3264,6 +3264,9 @@ walk_stmt_load_store_addr_ops (gimple st
&& TREE_CODE (gimple_call_chain (stmt)) == ADDR_EXPR)
ret |= visit_addr (stmt, TREE_OPERAND (gimple_call_chain (stmt), 0),
data);
+ if (visit_addr
+ && gimple_call_return_slot_opt_p (stmt))
+ ret |= visit_addr (stmt, gimple_call_lhs (stmt), data);
}
else if (gimple_code (stmt) == GIMPLE_ASM)
{
Index: tree-ssa-operands.c
===================================================================
--- tree-ssa-operands.c (revision 148325)
+++ tree-ssa-operands.c (working copy)
@@ -1035,6 +1035,10 @@ parse_ssa_operands (gimple stmt)
start = 1;
}
+ if (code == GIMPLE_CALL
+ && gimple_call_return_slot_opt_p (stmt))
+ mark_address_taken (gimple_call_lhs (stmt));
+
for (i = start; i < gimple_num_ops (stmt); i++)
get_expr_operands (stmt, gimple_op_ptr (stmt, i), opf_use);
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2009-06-10 19:37:07 |2009-06-10 21:29:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40389