01e27f8
2001-03-16  Jakub Jelinek  <jakub@redhat.com>
01e27f8
01e27f8
	* expr.c (expand_expr): If TARGET_EXPR is putting a non-constant
01e27f8
	variable into place of constant variable, clear the /u flag if
01e27f8
	possible.
01e27f8
01e27f8
--- gcc/expr.c.jj	Mon Mar 12 13:41:38 2001
01e27f8
+++ gcc/expr.c	Fri Mar 16 19:46:26 2001
01e27f8
@@ -8167,6 +8167,17 @@ expand_expr (exp, target, tmode, modifie
01e27f8
 	    else
01e27f8
 	      {
01e27f8
 		DECL_RTL (slot) = target;
01e27f8
+
01e27f8
+		/* If target is unchanging, but slot is not, we could end up
01e27f8
+		   initializing the unchanging target through non-unchanging
01e27f8
+		   references.  */
01e27f8
+		if (RTX_UNCHANGING_P (target) && ! TREE_READONLY (slot)
01e27f8
+		    && (GET_CODE (target) == REG
01e27f8
+			|| (GET_CODE (target) == MEM
01e27f8
+			    && GET_CODE (XEXP (target, 0)) == ADDRESSOF
01e27f8
+			    && GET_CODE (XEXP (XEXP (target, 0), 0)) == REG)))
01e27f8
+		  RTX_UNCHANGING_P (target) = 0;
01e27f8
+
01e27f8
 		/* If we must have an addressable slot, then make sure that
01e27f8
 		   the RTL that we just stored in slot is OK.  */
01e27f8
 		if (TREE_ADDRESSABLE (slot))