diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-12-16 10:02:37 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-12-16 10:02:37 +0000 |
commit | 1bae867a84abddcbd146f0a8b5d82426c3bb8a46 (patch) | |
tree | 179de2976b53f6f09f786013b2b4078605c8459c /gcc/expr.c | |
parent | 0e76460fddde9192e21f1a00c52bdb977153d7c8 (diff) | |
download | gcc-1bae867a84abddcbd146f0a8b5d82426c3bb8a46.zip gcc-1bae867a84abddcbd146f0a8b5d82426c3bb8a46.tar.gz gcc-1bae867a84abddcbd146f0a8b5d82426c3bb8a46.tar.bz2 |
re PR rtl-optimization/55630 (FAIL: g++.dg/pr48660.C -std=c++98 (internal compiler error))
PR rtl-optimization/55630
* expr.c (expand_assignment): Do not call copy_blkmode_to_reg to move
BLKmode return values to the return register.
From-SVN: r194530
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -4947,7 +4947,12 @@ expand_assignment (tree to, tree from, bool nontemporal) 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); |