--  A ghost array declared in a loop: it has no storage at run time, and its scope's end
--  releases none (it once released a secondary-stack mark never taken, 2026-10-30).
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   type Arr is array (Positive range <>) of Integer;
   function Make (N : Natural) return Arr is (1 .. N => 7) with Pre => N <= 100;
   Total : Integer := 0;
begin
   for I in 1 .. 100000 loop
      pragma Loop_Invariant (Total = I - 1);
      declare
         G : constant Arr := Make (50) with Ghost;
      begin
         Total := Total + 1;
      end;
   end loop;
   Put_Line (Integer'Image (Total));
end Main;
