This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
- From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Nov 2016 09:28:13 +0000
- Subject: [Bug target/78436] [7 Regression] incorrect write to larger-than-type bitfield (signed char x:9)
- Auto-submitted: auto-generated
- References: <bug-78436-4@http.gcc.gnu.org/bugzilla/>
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