[Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)

ktkachov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 21 09:33:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78436

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Assignment of negative values to signed bitfields has caused me some headaches
in encode_tree_to_bitpos due to native_encode_expr sign-extending the value to
GET_MODE_SIZE (TYPE_MODE (...)) bytes, making it necessary to truncate the
excess padding introduced. Maybe there's a but g in that logic


More information about the Gcc-bugs mailing list