summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 141904f1231..ae25d40a681 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1259,6 +1259,10 @@ emit_block_move (rtx x, rtx y, rtx size, enum block_op_methods method)
static bool
block_move_libcall_safe_for_call_parm (void)
{
+#if defined (REG_PARM_STACK_SPACE)
+ tree fn;
+#endif
+
/* If arguments are pushed on the stack, then they're safe. */
if (PUSH_ARGS)
return true;
@@ -1266,13 +1270,10 @@ block_move_libcall_safe_for_call_parm (void)
/* If registers go on the stack anyway, any argument is sure to clobber
an outgoing argument. */
#if defined (REG_PARM_STACK_SPACE)
- if (OUTGOING_REG_PARM_STACK_SPACE)
- {
- tree fn;
- fn = emit_block_move_libcall_fn (false);
- if (REG_PARM_STACK_SPACE (fn) != 0)
- return false;
- }
+ fn = emit_block_move_libcall_fn (false);
+ if (OUTGOING_REG_PARM_STACK_SPACE ((!fn ? NULL_TREE : TREE_TYPE (fn)))
+ && REG_PARM_STACK_SPACE (fn) != 0)
+ return false;
#endif
/* If any argument goes in memory, then it might clobber an outgoing