From: Richard Kenner Date: Thu, 2 Jun 1994 12:13:33 +0000 (-0400) Subject: (expand_expr, case ADDR_EXPR): If result is ignored, just return X-Git-Tag: misc/cutover-egcs-0~6522 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=119af78aa8c30f259b00678717ef67a0619cfe4e;p=thirdparty%2Fgcc.git (expand_expr, case ADDR_EXPR): If result is ignored, just return const0_rtx. From-SVN: r7421 --- 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