diff options
| author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-16 06:09:39 +0000 |
|---|---|---|
| committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-16 06:09:39 +0000 |
| commit | 6db2b7abe69e63b9d8c2f8b0f137f8a2e52a76ba (patch) | |
| tree | b073fded453a1e3b898f1d4fb78e2e1cb3506b84 | |
| parent | ffe1802ec687bd6abc86d252f294bef9bbed99ee (diff) | |
| download | ppe42-gcc-6db2b7abe69e63b9d8c2f8b0f137f8a2e52a76ba.tar.gz ppe42-gcc-6db2b7abe69e63b9d8c2f8b0f137f8a2e52a76ba.zip | |
PR middle-end/6279
* expr.c (store_expr): Don't copy if DECL_RTL (exp) == target.
* expr.c (safe_from_p): Cleanup: use DECL_RTL_IF_SET.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52356 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/expr.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 83627779e07..6fc0b2454dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-04-16 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/6279 + * expr.c (store_expr): Don't copy if DECL_RTL (exp) == target. + + * expr.c (safe_from_p): Cleanup: use DECL_RTL_IF_SET. + 2002-04-15 Richard Henderson <rth@redhat.com> * config/mips/abi64.h (SUBTARGET_CONDITIONAL_REGISTER_USAGE): Set diff --git a/gcc/expr.c b/gcc/expr.c index c5b1eced98d..55002afc58f 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4125,7 +4125,12 @@ store_expr (exp, target, want_value) || (temp != target && (side_effects_p (temp) || side_effects_p (target)))) && TREE_CODE (exp) != ERROR_MARK - && ! dont_store_target) + && ! 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))) { target = protect_from_queue (target, 1); if (GET_MODE (temp) != GET_MODE (target) @@ -5598,7 +5603,7 @@ safe_from_p (x, exp, top_p) switch (TREE_CODE_CLASS (TREE_CODE (exp))) { case 'd': - exp_rtl = DECL_RTL_SET_P (exp) ? DECL_RTL (exp) : NULL_RTX; + exp_rtl = DECL_RTL_IF_SET (exp); break; case 'c': |

