aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-07-29 12:53:34 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-07-29 12:53:34 -0700
commit6f1087be10e5765a7dde63dca95fecf7f359d021 (patch)
tree2f03e25d0a8da1b034e4545a18f1ffde2c8ca534 /gcc/expr.c
parent61ccbcfd47fc677635169421f8ecb079fa99c5f8 (diff)
downloadgcc-6f1087be10e5765a7dde63dca95fecf7f359d021.zip
gcc-6f1087be10e5765a7dde63dca95fecf7f359d021.tar.gz
gcc-6f1087be10e5765a7dde63dca95fecf7f359d021.tar.bz2
emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from set_mem_attributes and add BITPOS argument.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Rename from set_mem_attributes and add BITPOS argument. Subtract it from OFFSET when same is adjusted. (set_mem_attributes): New wrapper function. * expr.c (expand_assignment): Use set_mem_attributes_minus_bitpos; remove offset adjustment hack. * expr.h (set_mem_attributes_minus_bitpos): Declare. From-SVN: r55846
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 1b880c1..810400c 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3846,17 +3846,7 @@ expand_assignment (to, from, want_value, suggest_reg)
DECL_RTX of the parent struct. Don't munge it. */
to_rtx = shallow_copy_rtx (to_rtx);
- set_mem_attributes (to_rtx, to, 0);
-
- /* If we changed MEM_EXPR, that means we're now referencing
- the COMPONENT_REF, which means that MEM_OFFSET must be
- relative to that field. But we've not yet reflected BITPOS
- in TO_RTX. This will be done in store_field. Adjust for
- that by biasing MEM_OFFSET by -bitpos. */
- if (MEM_EXPR (to_rtx) != old_expr && MEM_OFFSET (to_rtx)
- && (bitpos / BITS_PER_UNIT) != 0)
- set_mem_offset (to_rtx, GEN_INT (INTVAL (MEM_OFFSET (to_rtx))
- - (bitpos / BITS_PER_UNIT)));
+ set_mem_attributes_minus_bitpos (to_rtx, to, 0, bitpos);
}
/* Deal with volatile and readonly fields. The former is only done