diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1998-08-14 13:58:02 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1998-08-14 14:58:02 +0100 |
commit | 6036acbbf2daa09fde4b435fd053adcf88fe492a (patch) | |
tree | 9f6e54438bcf5f94755741d5145f04249e4d794b /gcc/expr.c | |
parent | 141dba98fdd28e263dbdf626ee97dd5cf70d3d86 (diff) | |
download | gcc-6036acbbf2daa09fde4b435fd053adcf88fe492a.zip gcc-6036acbbf2daa09fde4b435fd053adcf88fe492a.tar.gz gcc-6036acbbf2daa09fde4b435fd053adcf88fe492a.tar.bz2 |
expr.c (store_expr): Don't optimize away load-store pair when either source or destination have a...
* expr.c (store_expr): Don't optimize away load-store pair
when either source or destination have a side effect.
From-SVN: r21732
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3457,7 +3457,10 @@ store_expr (exp, target, want_value) /* If value was not generated in the target, store it there. Convert the value to TARGET's type first if nec. */ - if (! rtx_equal_p (temp, target) && TREE_CODE (exp) != ERROR_MARK) + if ((! rtx_equal_p (temp, target) + || side_effects_p (temp) + || side_effects_p (target)) + && TREE_CODE (exp) != ERROR_MARK) { target = protect_from_queue (target, 1); if (GET_MODE (temp) != GET_MODE (target) |