From 119af78aa8c30f259b00678717ef67a0619cfe4e Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 2 Jun 1994 08:13:33 -0400 Subject: [PATCH] (expand_expr, case ADDR_EXPR): If result is ignored, just return const0_rtx. From-SVN: r7421 --- gcc/expr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/expr.c b/gcc/expr.c index edfd2ee8f745..2e0f5ef9013a 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5863,6 +5863,12 @@ expand_expr (exp, target, tmode, modifier) (modifier == EXPAND_INITIALIZER ? modifier : EXPAND_CONST_ADDRESS)); + /* If we are going to ignore the result, OP0 will have been set + to const0_rtx, so just return it. Don't get confused and + think we are taking the address of the constant. */ + if (ignore) + return op0; + /* We would like the object in memory. If it is a constant, we can have it be statically allocated into memory. For a non-constant (REG, SUBREG or CONCAT), we need to allocate some -- 2.47.2