From: Richard Kenner Date: Fri, 22 Dec 1995 22:55:49 +0000 (-0500) Subject: (store_constructor): Don't call change_address on REG. X-Git-Tag: misc/cutover-egcs-0~3207 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=9151b3bf9265cb1739bf7e9144e7ed5a78ec590a;p=gcc.git (store_constructor): Don't call change_address on REG. (expand_expr, case CONSTRUCTOR): Likewise. From-SVN: r10836 --- diff --git a/gcc/expr.c b/gcc/expr.c index fb415c6d05d7..c0700df3c7f2 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3082,8 +3082,9 @@ store_constructor (exp, target) if (TREE_READONLY (field)) { - to_rtx = change_address (to_rtx, GET_MODE (to_rtx), - XEXP (to_rtx, 0)); + if (GET_CODE (to_rtx) == MEM) + to_rtx = change_address (to_rtx, GET_MODE (to_rtx), + XEXP (to_rtx, 0)); RTX_UNCHANGING_P (to_rtx) = 1; } @@ -4553,8 +4554,9 @@ expand_expr (exp, target, tmode, modifier) if (TREE_READONLY (exp)) { - target = change_address (target, GET_MODE (target), - XEXP (target, 0)); + if (GET_CODE (target) == MEM) + target = change_address (target, GET_MODE (target), + XEXP (target, 0)); RTX_UNCHANGING_P (target) = 1; }