[Bug tree-optimization/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 21 10:11:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78436
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 40096
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40096&action=edit
gcc7-pr78436.patch
Untested fix. Most of the changes are just nits I ran into when debugging,
the real fix is that byte_size is apparently intentionally 1 byte larger than
the mode size, so that shifting by 0 to BITS_PER_UNIT - 1 has the extra byte to
shift into. But when not shifting, we IMHO need to subtract that extra + 1
back.
More information about the Gcc-bugs
mailing list