diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-06-02 08:13:33 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-06-02 08:13:33 -0400 |
commit | 119af78aa8c30f259b00678717ef67a0619cfe4e (patch) | |
tree | 5fd7645b59cca8c3cee69ce3c90c7f68116bb26d /gcc | |
parent | 94b25f81caba08a4b8a4d031d7df61b287d19b8e (diff) | |
download | gcc-119af78aa8c30f259b00678717ef67a0619cfe4e.zip gcc-119af78aa8c30f259b00678717ef67a0619cfe4e.tar.gz gcc-119af78aa8c30f259b00678717ef67a0619cfe4e.tar.bz2 |
(expand_expr, case ADDR_EXPR): If result is ignored, just return
const0_rtx.
From-SVN: r7421
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expr.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |