[Ada] Fix unexpected rounded up value for 'Size of small variable
Eric Botcazou
ebotcazou@adacore.com
Wed Sep 16 15:04:00 GMT 2009
This is a regression on mainline and 4.4 branch. If Pragma Optimize_Alignment
(Time) is in effect, the value of 'Size returned at run time for a variable
whose type is a composite type with a size smaller than the word size and an
alignment less than the word alignment is wrongly rounded up to the word size.
Tested on i586-suse-linux, applied on the mainline and 4.4 branch.
2009-09-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Size>: Strip
conversions between original and packable version of types from
the expression.
2009-09-16 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/alignment9.adb: New test.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alignment9.adb
Type: text/x-adasrc
Size: 444 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090916/0658a1ff/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 1139 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090916/0658a1ff/attachment-0001.bin>
More information about the Gcc-patches
mailing list