+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-17 Trevor Saunders <tsaunders@mozilla.com>
* gcc-interface/ada-tree.h: Remove usage of variable_size gty
we can just use the high bound of the index type. */
else if ((Nkind (gnat_index) == N_Range
&& cannot_be_superflat_p (gnat_index))
- /* Packed Array Types are never superflat. */
- || Is_Packed_Array_Type (gnat_entity))
+ /* Bit-Packed Array Types are never superflat. */
+ || (Is_Packed_Array_Type (gnat_entity)
+ && Is_Bit_Packed_Array
+ (Original_Array_Type (gnat_entity))))
gnu_high = gnu_max;
/* Otherwise, if the high bound is constant but the low bound is
+2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/enum3.adb: New test.
+
2014-05-18 Andreas Schwab <schwab@suse.de>
* gcc.target/ia64/visibility-1.c (variable_l): Add used attribute.
--- /dev/null
+-- { dg-do run }
+
+procedure Enum3 is
+ type Enum is (Aaa, Bbb, Ccc);
+ for Enum use (1,2,4);
+begin
+ for Lo in Enum loop
+ for Hi in Enum loop
+ declare
+ subtype S is Enum range Lo .. Hi;
+ type Vector is array (S) of Integer;
+ Vec : Vector;
+ begin
+ for I in S loop
+ Vec (I) := 0;
+ end loop;
+ if Vec /= (S => 0) then
+ raise Program_Error;
+ end if;
+ end;
+ end loop;
+ end loop;
+end;