[Bug tree-optimization/52979] [4.7 Regression] likely wrong code bug w/packed bitfields

2012-06-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||4.7.1
 Resolution||FIXED

--- Comment #12 from Richard Guenther  2012-06-04 
10:23:51 UTC ---
Fixed.


[Bug tree-optimization/52979] [4.7 Regression] likely wrong code bug w/packed bitfields

2012-06-04 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979

--- Comment #11 from Richard Guenther  2012-06-04 
10:19:49 UTC ---
Author: rguenth
Date: Mon Jun  4 10:19:44 2012
New Revision: 188176

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188176
Log:
2012-06-04  Richard Guenther  

Backport from mainline
2012-04-25  Jakub Jelinek  

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:
branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr52979-1.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/execute/pr52979-1.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/execute/pr52979-2.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/expmed.c
branches/gcc-4_7-branch/gcc/stor-layout.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug tree-optimization/52979] [4.7 Regression] likely wrong code bug w/packed bitfields

2012-04-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2


[Bug tree-optimization/52979] [4.7 Regression] likely wrong code bug w/packed bitfields

2012-04-25 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52979

Jakub Jelinek  changed:

   What|Removed |Added

  Known to work||4.8.0
Summary|[4.7/4.8 Regression] likely |[4.7 Regression] likely
   |wrong code bug w/packed |wrong code bug w/packed
   |bitfields   |bitfields
  Known to fail|4.8.0   |

--- Comment #10 from Jakub Jelinek  2012-04-25 
18:36:10 UTC ---
Should be fixed on the trunk.  On the 4.7 branch it needs PR48124 backport.