--  Calls of a generic formal subprogram take the formal's default values, not the actual's
--  (RM 12.6(9), ACATS C74305B), and names in a generic's declaration mean what they mean
--  there, not at its body or the instance (RM 12.3(20), ACATS CC1010A).
with Ada.Text_IO;
procedure Main is
   Free : constant Integer := 5;
   generic
      G : Integer := Free;
      with procedure Show (X : Integer := 2; Y : Integer := 2);
   procedure Run (P : Integer := Free);
   Free_Too : constant Integer := Free + 1;
   procedure Run (P : Integer := Main.Free) is
   begin
      Ada.Text_IO.Put_Line (Integer'Image (G) & Integer'Image (P) & Integer'Image (Free_Too));
      Show;
   end Run;
   procedure Print (X : Integer := 3; Y : Integer := 3) is
   begin
      Ada.Text_IO.Put_Line (Integer'Image (X) & Integer'Image (Y));
   end Print;
   package Inner is
      Free : constant Integer := 7;
      procedure Go is new Run (Show => Print);
   end Inner;
begin
   Inner.Go;
   Ada.Text_IO.Put_Line (Integer'Image (Inner.Free));
end Main;
