From 8c317c5f947d932a1a7bfa0a14711bf127936154 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 16 Sep 2002 21:15:12 -0700 Subject: [PATCH] emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE as well as OFFSET for BITPOS. * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE as well as OFFSET for BITPOS. From-SVN: r57228 --- gcc/ChangeLog | 5 +++++ gcc/emit-rtl.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 847e93afb20..0a5248f0d07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-16 Richard Henderson + + * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust SIZE + as well as OFFSET for BITPOS. + 2002-09-16 Jeff Garzik * config.gcc: Treat winchip_c6-*|winchip2-*|c3-* as pentium-mmx. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 70a1228450e..4a8b9e36ea3 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1885,9 +1885,14 @@ set_mem_attributes_minus_bitpos (ref, t, objectp, bitpos) } /* If we modified OFFSET based on T, then subtract the outstanding - bit position offset. */ + bit position offset. Similarly, increase the size of the accessed + object to contain the negative offset. */ if (apply_bitpos) - offset = plus_constant (offset, -(apply_bitpos / BITS_PER_UNIT)); + { + offset = plus_constant (offset, -(apply_bitpos / BITS_PER_UNIT)); + if (size) + size = plus_constant (size, apply_bitpos / BITS_PER_UNIT); + } /* Now set the attributes we computed above. */ MEM_ATTRS (ref) -- 2.30.2