aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/opt46_pkg.ads
blob: 1309315378f2742e24f364019c28b1ff4c5c91b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
generic
   type Table_Component_Type is private;
   type Table_Index_Type     is range <>;

   Table_Low_Bound : Table_Index_Type;

package Opt46_Pkg is

   type Table_Type is
     array (Table_Index_Type range <>) of Table_Component_Type;
   subtype Big_Table_Type is
     Table_Type (Table_Low_Bound .. Table_Index_Type'Last);

   type Table_Ptr is access all Big_Table_Type;

   type Table_Private is private;

   type Instance is record
      Table : aliased Table_Ptr := null;
      P : Table_Private;
   end record;

   function Last (T : Instance) return Table_Index_Type;

private

   type Table_Private is record
      Last_Val : Integer;
   end record;

end Opt46_Pkg;