From: Eric Botcazou Date: Sun, 16 Dec 2012 10:02:37 +0000 (+0000) Subject: re PR rtl-optimization/55630 (FAIL: g++.dg/pr48660.C -std=c++98 (internal compiler... X-Git-Tag: releases/gcc-4.8.0~1358 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bae867a84abddcbd146f0a8b5d82426c3bb8a46;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b5d926561ff..7156bc6a750f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-12-16 Eric Botcazou + + PR rtl-optimization/55630 + * expr.c (expand_assignment): Do not call copy_blkmode_to_reg to move + BLKmode return values to the return register. + 2012-12-15 Alexandre Oliva PR libmudflap/53952 diff --git a/gcc/expr.c b/gcc/expr.c index 7e86983d7558..9d9e5b9abf59 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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);