===================================================================
@@ -4920,7 +4920,12 @@ expand_assignment (tree to, tree from, b
rtx temp;
push_temp_slots ();
- if (REG_P (to_rtx) && TYPE_MODE (TREE_TYPE (from)) == BLKmode)
+
+ /* If the source is itself a return value, it still is in a pseudo at
+ this point so we can move it back to the return register directly. */
+ if (REG_P (to_rtx)
+ && TYPE_MODE (TREE_TYPE (from)) == BLKmode
+ && TREE_CODE (from) != CALL_EXPR)
temp = copy_blkmode_to_reg (GET_MODE (to_rtx), from);
else
temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL);