diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-31 07:23:35 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-31 07:23:35 -0500 |
commit | 7a0b7b9a972c599a69113e5baf619fcb28acb578 (patch) | |
tree | 68d59eca9228dd08865abda679e5460a4223c5a4 | |
parent | ae979c8c29ef98309217c886283a1e95df903298 (diff) | |
download | gcc-7a0b7b9a972c599a69113e5baf619fcb28acb578.zip gcc-7a0b7b9a972c599a69113e5baf619fcb28acb578.tar.gz gcc-7a0b7b9a972c599a69113e5baf619fcb28acb578.tar.bz2 |
(expand_expr, case COMPONENT_REF): Don't extract field from a CONSTRUCTOR if it already has a TREE_CST_RTL.
(expand_expr, case COMPONENT_REF): Don't extract field from a CONSTRUCTOR if
it already has a TREE_CST_RTL.
(expand_expr, case ADDR_EXPR): Call mark_temp_addr_taken on the temporary made
when operand needs to be stored into memory.
From-SVN: r8362
-rw-r--r-- | gcc/expr.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4485,9 +4485,12 @@ expand_expr (exp, target, tmode, modifier) case COMPONENT_REF: case BIT_FIELD_REF: /* If the operand is a CONSTRUCTOR, we can just extract the - appropriate field if it is present. */ + appropriate field if it is present. Don't do this if we have + already written the data since we want to refer to that copy + and varasm.c assumes that's what we'll do. */ if (code != ARRAY_REF - && TREE_CODE (TREE_OPERAND (exp, 0)) == CONSTRUCTOR) + && TREE_CODE (TREE_OPERAND (exp, 0)) == CONSTRUCTOR + && TREE_CST_RTL (TREE_OPERAND (exp, 0)) == 0) { tree elt; @@ -6066,6 +6069,7 @@ expand_expr (exp, target, tmode, modifier) = assign_stack_temp (inner_mode, int_size_in_bytes (inner_type), 1); + mark_temp_addr_taken (memloc); emit_move_insn (memloc, op0); op0 = memloc; } |