[Bug tree-optimization/52979] [4.7/4.8 Regression] likely wrong code bug w/packed bitfields
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Apr 25 14:27:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-04-25 14:27:15 UTC ---
Author: jakub
Date: Wed Apr 25 14:27:08 2012
New Revision: 186819
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186819
Log:
PR middle-end/52979
* stor-layout.c (get_best_mode): Don't return mode with bitsize
larger than maxbits. Don't compute maxbits modulo align.
Also check that unit bytes long store at bitpos / unit * unit
doesn't affect bits beyond bitregion_end.
* expmed.c (store_bit_field_1): Avoid trying insv if OP_MODE MEM
would not fit into bitregion_start ... bitregion_end + 1 bit
region.
(store_split_bit_field): Decrease unit close to end of bitregion_end
if access is restricted in order to avoid mutual recursion.
* gcc.c-torture/compile/pr52979-1.c: New test.
* gcc.c-torture/execute/pr52979-1.c: New test.
* gcc.c-torture/execute/pr52979-2.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr52979-1.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr52979-1.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr52979-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expmed.c
trunk/gcc/stor-layout.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list