2012-03-20 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Mar 2012 09:31:40 +0000 (09:31 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Mar 2012 09:31:40 +0000 (09:31 +0000)
commitfa42e1a454c4d18a219486c7e0878ce51265456a
tree0549509c3acd6070b5ca74672b96a9e435dd8bf6
parent0a13aca8a92a07b7c5c1dbcbdbcce6f04c9e07d5
2012-03-20  Richard Guenther  <rguenther@suse.de>

* stor-layout.c (finish_bitfield_representative): Fallback
to conservative maximum size if the padding up to the next
field cannot be computed as a constant.
(finish_bitfield_layout): If we cannot compute the distance
between the start of the bitfield representative and the
bitfield member start a new representative.
* expr.c (get_bit_range): The distance between the start of
the bitfield representative and the bitfield member is zero
if the field offsets are not constants.

* gnat.dg/pack16.adb: New testcase.
* gnat.dg/pack16_pkg.ads: Likewise.
* gnat.dg/specs/pack8.ads: Likewise.
* gnat.dg/specs/pack8_pkg.ads: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185563 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/expr.c
gcc/stor-layout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/pack16.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/pack16_pkg.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/pack8.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/specs/pack8_pkg.ads [new file with mode: 0644]