OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / varsize_copy.adb
1 -- { dg-do compile }
2 -- { dg-options "-O -gnatws" }
3
4 package body Varsize_Copy is
5
6    type Key_Mapping_Type is record
7       Page : Page_Type;
8       B    : Boolean;
9    end record;
10
11    type Key_Mapping_Array is array (Key_Type) of Key_Mapping_Type;
12
13    type Set is record
14       Key_Mappings : Key_Mapping_Array;
15    end record;
16
17    S : Set;
18
19    function F (Key : Key_Type) return Page_Type is
20    begin
21       return S.Key_Mappings (Key).Page;
22    end;
23
24 end Varsize_Copy;