* expr.c (store_expr): Don't optimize away load-store pair
when either source or destination have a side effect.
From-SVN: r21732
+Fri Aug 14 21:52:53 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * expr.c (store_expr): Don't optimize away load-store pair
+ when either source or destination have a side effect.
+
Fri Aug 14 16:50:10 1998 John Carr <jfc@mit.edu>
* genrecog.c (add_to_sequence): Fatal error if the modes of the operands
/* 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)