OSDN Git Service

2012-06-04 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Jun 2012 10:19:44 +0000 (10:19 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Jun 2012 10:19:44 +0000 (10:19 +0000)
commite99c78e38fa66ba0ec258eb6bec611b98fb4fc71
treea831b9f16feaa4a02a1fae994d4cc9fe27d51789
parent73d75c909c7aeed7cf4243f88ef1539cbb46131f
2012-06-04  Richard Guenther  <rguenther@suse.de>

Backport from mainline
2012-04-25  Jakub Jelinek  <jakub@redhat.com>

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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188176 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/expmed.c
gcc/stor-layout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr52979-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr52979-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/pr52979-2.c [new file with mode: 0644]