From: Jeffrey A Law Date: Sat, 15 Aug 1998 00:41:25 +0000 (+0000) Subject: From Joern: X-Git-Tag: prereleases/egcs-1.1-prerelease~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=656ec0baba023139243d9b4d19d09f0bf42f810b;p=thirdparty%2Fgcc.git From Joern: * expr.c (store_expr): Don't optimize away load-store pair when either source or destination have a side effect. From-SVN: r21745 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 819acb64c754..716c5d43d111 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 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. diff --git a/gcc/expr.c b/gcc/expr.c index ceb537e721ed..0eb20dcb0bf8 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -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)