aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/lto21_pkg2.adb
blob: 5d38102d8f23111be12a9002500fd71be2574c27 (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
with Ada.Containers; use Ada.Containers;
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Vectors;

package body Lto21_Pkg2 is

   pragma Suppress (Tampering_Check);

   procedure Proc is

      function Hash (Syd : Natural) return Hash_Type is (Hash_Type'Mod (Syd));

      package Vect2 is new Vectors (Positive, Natural);

      package Maps is
        new Hashed_Maps (Natural, Vect2.Vector, Hash, "=", Vect2."=");

      procedure Nested (M : Maps.Map) is
         use Maps;
         procedure Inner (Position : Cursor) is null;
      begin
         Iterate (M, Inner'Access);
      end;

      M : Maps.Map;
   begin
      Nested (M);
   end;

end Lto21_Pkg2;