[Ada] Fix bogus error with packed array type on AVR

Eric Botcazou ebotcazou@adacore.com
Fri Oct 30 15:27:00 GMT 2009


The testcase fails to compile for targets that define MAX_FIXED_MODE_SIZE to 
something smaller than 64, in particular the AVR.  It turns out that the 
check responsible for the problem is overzealous and can be relaxed.

Tested on i586-suse-linux, applied on the mainline.


2009-10-30  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (MAX_FIXED_MODE_SIZE): Delete.
	(create_field_decl): Update description.  In a packed record, round
	the size up to a byte boundary only if the field's type has BLKmode.
	* gcc-interface/gigi.h (create_field_decl): Update description.


2009-10-30  Eric Botcazou  <ebotcazou@adacore.com>

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


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 3724 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091030/921441a3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pack5.ads
Type: text/x-adasrc
Size: 222 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091030/921441a3/attachment-0001.bin>


More information about the Gcc-patches mailing list