[Ada] Fix wrong code generated for superflat array

Eric Botcazou ebotcazou@adacore.com
Sun May 18 17:53:00 GMT 2014


This is a regression present on the mainline and 4.9 branch for a corner case: 
a superflat array indexed by an enumeration type with representation clause.

Tested on x86_64-suse-linux, applied on the mainline and 4.9 branch.


2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
	consider that regular packed arrays can never be superflat.


2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>

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


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140518/bc4e7db3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enum3.adb
Type: text/x-adasrc
Size: 522 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140518/bc4e7db3/attachment-0001.bin>


More information about the Gcc-patches mailing list