[Ada] Do not create integer types with precision 0

Eric Botcazou ebotcazou@adacore.com
Thu Oct 29 18:42:00 GMT 2009


Gigi, namely make_type_from_size, can create integer types with precision 0 
for an E_Enumeration_Subtype with RM_Size 0:

   subtype False_T is Boolean range False .. False;

and this is now caught on mainline.

Fixed thusly, tested on i586-suse-linux, applied on the mainline.


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

	* gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Do not
	create integer types with precision 0.


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

	* gnat.dg/pack14.adb: New test.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 598 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091029/ec03aebb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pack14.adb
Type: text/x-adasrc
Size: 224 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091029/ec03aebb/attachment-0001.bin>


More information about the Gcc-patches mailing list