aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.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/expr.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/expr.c')
-rw-r--r--gcc/expr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 93ab7e0..a38dee1 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -4253,11 +4253,13 @@ store_expr (tree exp, rtx target, int want_value)
|| side_effects_p (target))))
&& TREE_CODE (exp) != ERROR_MARK
&& ! dont_store_target
- /* If store_expr stores a DECL whose DECL_RTL(exp) == TARGET,
- but TARGET is not valid memory reference, TEMP will differ
- from TARGET although it is really the same location. */
- && (TREE_CODE_CLASS (TREE_CODE (exp)) != 'd'
- || target != DECL_RTL_IF_SET (exp))
+ /* If store_expr stores a DECL whose DECL_RTL(exp) == TARGET,
+ but TARGET is not valid memory reference, TEMP will differ
+ from TARGET although it is really the same location. */
+ && !(GET_CODE (target) == MEM
+ && GET_CODE (XEXP (target, 0)) != QUEUED
+ && (!memory_address_p (GET_MODE (target), XEXP (target, 0))
+ || (flag_force_addr && !REG_P (XEXP (target, 0)))))
/* If there's nothing to copy, don't bother. Don't call expr_size
unless necessary, because some front-ends (C++) expr_size-hook
aborts on objects that are not supposed to be bit-copied or