c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / gnat.dg / varsize2.adb
blob70a5b0629719e613fb6a44c3b1ee5dec5c8b7f9f
1 -- { dg-do compile }
2 -- { dg-options "-O -gnatws" }
4 package body Varsize2 is
6 type Key_Mapping_Type is record
7 Page : Page_Type;
8 B : Boolean;
9 end record;
11 type Key_Mapping_Array is array (Key_Type) of Key_Mapping_Type;
13 type Set is record
14 Key_Mappings : Key_Mapping_Array;
15 end record;
17 S : Set;
19 function F (Key : Key_Type) return Page_Type is
20 begin
21 return S.Key_Mappings (Key).Page;
22 end;
24 end Varsize2;