[Ada] Fix 'Last_Bit attribute applied to zero-sized type

Eric Botcazou ebotcazou@adacore.com
Sun May 26 10:06:00 GMT 2013


The value of the attribute should be -1 if an object of such a type is placed 
on a storage unit boundary, but the compiler was generating Storage_Error.

Tested on x86_64-suse-linux, applied on all active branches.


2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Last_Bit>: Add kludge
	to avoid generating an overflow for -1.


2013-05-26  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/specs/last_bit.ads: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: last_bit.ads
Type: text/x-adasrc
Size: 495 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130526/66f1a65d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130526/66f1a65d/attachment-0001.bin>


More information about the Gcc-patches mailing list