--  An instance with formal objects made inside a nested subprogram holds them there: they
--  were held by the subprogram enclosing the generic, which made a false B3001 ("might be
--  read before it is assigned").
with Ada.Text_IO;
procedure Main is
   generic
      G : Integer;
   procedure Run;
   procedure Run is
   begin
      Ada.Text_IO.Put_Line (Integer'Image (G));
   end Run;
   generic
      Start : Integer;
   package Counters is
      function Value return Integer is (Start);
   end Counters;
   procedure Inner (N : Integer) with Pre => N in 0 .. 100 is
      procedure Go is new Run (N + 4);
      package C is new Counters (N * 2);
   begin
      Go;
      Ada.Text_IO.Put_Line (Integer'Image (C.Value));
   end Inner;
begin
   Inner (3);
end Main;
