This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/51994] [4.6/4.7 Regression] git-1.7.8.3 miscompiled due to negative bitpos from get_inner_reference
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2012 11:39:11 +0000
- Subject: [Bug middle-end/51994] [4.6/4.7 Regression] git-1.7.8.3 miscompiled due to negative bitpos from get_inner_reference
- Auto-submitted: auto-generated
- References: <bug-51994-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51994
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-25 11:39:11 UTC ---
(In reply to comment #2)
> > 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?
>
> It might also be interesting to find out why we have a negative bitpos here.
gcc passes (&buf - 1) to get_innter_reference, so it returns *pbitpos = -8.