* expr.c (store_expr): Don't optimize away load-store pair
when either source or destination have a side effect.
From-SVN: r21745
Fri Aug 14 21:07:03 1998 Jeffrey A Law (law@cygnus.com)
+ From Joern:
+ * expr.c (store_expr): Don't optimize away load-store pair
+ when either source or destination have a side effect.
+
* loop.c (add_label_notes): Do not ignore references to labels
before dispatch tables. Mirrors Apr 8 change to mark_jump_label.
* gcse.c (add_label_notes): Similarly.
/* 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)