[Bug tree-optimization/46620] 32-bit structures containing bitfields are not copied correctly on -O2 , x86 backend
aoliva at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 16 01:20:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46620
--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-02-16 00:53:18 UTC ---
Created attachment 23358
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23358
Patch that fixes the problem
The problem is that we lost track at the first padding bit within a word,
narrowing the accessed word to it rather than past the field after that word.
We're trying to expand the range 24..31, starting out with the range 0..31,
skipping the first two fields to 7..31, and then get to the field that starts
at bit 8. We currently decide that's past the relevant range because fbit (8)
is not <= mbit (7), but it is < bit (24), so we should have taken the path that
advances mbit instead of truncating msize.
More information about the Gcc-bugs
mailing list