aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-12-31 18:41:28 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-12-31 18:41:28 +0000
commit9c5c5f2cd1c780f85df07731c7e5547acce198db (patch)
treeca5892b65be66a80c4067e181a0309181e237a4f /gcc/c-common.c
parentd4de0221f3539de204f92443ca66a0e8b36de64b (diff)
downloadgcc-9c5c5f2cd1c780f85df07731c7e5547acce198db.zip
gcc-9c5c5f2cd1c780f85df07731c7e5547acce198db.tar.gz
gcc-9c5c5f2cd1c780f85df07731c7e5547acce198db.tar.bz2
c-common.c (c_expand_expr): Remove code to return a value different from that returned by expand_expr.
* c-common.c (c_expand_expr): Remove code to return a value different from that returned by expand_expr. * expr.c (store_expr): Use the validity of a target MEM, rather than checking DECL_RTL (exp), to figure out if a copy is required. From-SVN: r75273
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 3ba73dd2..327a4dc 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4064,7 +4064,6 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier)
tree rtl_expr;
rtx result;
bool preserve_result = false;
- bool return_target = false;
if (STMT_EXPR_WARN_UNUSED_RESULT (exp) && target == const0_rtx)
{
@@ -4112,20 +4111,10 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier)
if (TREE_CODE (last) == SCOPE_STMT
&& TREE_CODE (expr) == EXPR_STMT)
{
- if (target && TREE_CODE (EXPR_STMT_EXPR (expr)) == VAR_DECL
- && DECL_RTL_IF_SET (EXPR_STMT_EXPR (expr)) == target)
- /* If the last expression is a variable whose RTL is the
- same as our target, just return the target; if it
- isn't valid expanding the decl would produce different
- RTL, and store_expr would try to do a copy. */
- return_target = true;
- else
- {
- /* Otherwise, note that we want the value from the last
- expression. */
- TREE_ADDRESSABLE (expr) = 1;
- preserve_result = true;
- }
+ /* Otherwise, note that we want the value from the last
+ expression. */
+ TREE_ADDRESSABLE (expr) = 1;
+ preserve_result = true;
}
}
@@ -4133,9 +4122,7 @@ c_expand_expr (tree exp, rtx target, enum machine_mode tmode, int modifier)
expand_end_stmt_expr (rtl_expr);
result = expand_expr (rtl_expr, target, tmode, modifier);
- if (return_target)
- result = target;
- else if (preserve_result && GET_CODE (result) == MEM)
+ if (preserve_result && GET_CODE (result) == MEM)
{
if (GET_MODE (result) != BLKmode)
result = copy_to_reg (result);