From 9151b3bf9265cb1739bf7e9144e7ed5a78ec590a Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 22 Dec 1995 17:55:49 -0500 Subject: [PATCH] (store_constructor): Don't call change_address on REG. (expand_expr, case CONSTRUCTOR): Likewise. From-SVN: r10836 --- gcc/expr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index fb415c6d05d..c0700df3c7f 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; } -- 2.30.2