]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(expand_expr, case ADDR_EXPR): If result is ignored, just return
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 2 Jun 1994 12:13:33 +0000 (08:13 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 2 Jun 1994 12:13:33 +0000 (08:13 -0400)
const0_rtx.

From-SVN: r7421

gcc/expr.c

index edfd2ee8f74591ef48595bdf571223beefa45d09..2e0f5ef9013a41e6c36f7f1f926cdc6f31579236 100644 (file)
@@ -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