2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gnat.dg / addr_slice.adb
blob2506148089ef0dddc9eac4d2b1b600479f0c648f
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
4 procedure Addr_Slice is
5 type Item_Type is record
6 I : Integer;
7 end record;
9 type Index_Type is (A, B);
10 for Index_Type use (A => 1, B => 10);
12 Item_Array : constant array (Index_Type) of Item_Type
13 := (A => (I => 10), B => (I => 22));
15 Item : Item_Type;
16 for Item'Address use Item_Array(Index_Type)'Address;
17 begin
18 null;
19 end;