[Bug middle-end/51994] [4.6/4.7 Regression] git-1.7.8.3 miscompiled due to negative bitpos from get_inner_reference
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 25 11:10:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51994
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-25
CC| |ebotcazou at gcc dot
| |gnu.org
Component|tree-optimization |middle-end
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-25 10:56:37 UTC ---
Negative bitpos is fine - Ada uses that quite extensively and with MEM_REFs
this just got more prominent. get_inner_reference is declared to return
a _signed_ HOST_WIDE_INT bitpos for a reason.
What should happen instead is that store_field needs to adjust the address
to properly point before the bitfield for calling store_bit_field. Or the
latter needs to take signed arguments for bitpos and do the adjustment
itself.
Does simply changing the store_bit_field[_1] prototype work for you?
More information about the Gcc-bugs
mailing list