------- Comment #4 from amylaar at gcc dot gnu dot org 2006-01-30 18:29 ------- (In reply to comment #3) > This is caused by the following code in gimplifier: > 3297 if (use_target) > 3298 { > 3299 CALL_EXPR_RETURN_SLOT_OPT (*from_p) = 1; > 3300 lang_hooks.mark_addressable (*to_p); > 3301 } > > > Should we really be calling lang_hooks.mark_addressable, here? >
I think the problem is actually not testing properly if the value is a register variable first. A few lines before in gimplify.c:gimplify_modify_expr_rhs, we have: else if (is_gimple_reg_type (TREE_TYPE (*to_p))) /* Also don't force regs into memory. */ use_target = false; However, is_gimple_reg_type merely looks if the type is an aggregate. The test that c-typeck.c:c_mark_addressable uses tests C_DECL_REGISTER . It appears we actually don't have any way to query from the frontend-indenpendent code if we can mark something as safely. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26004