with Dangler, Ada.Text_IO;
use Dangler, Ada.Text_IO;

procedure demo is
	Ptr : Integer_Access := Dangle; --After this call, Ptr is now a dangling access/reference/pointer
begin
	Put_Line("Value is " & Integer'Image(Ptr.all)); --This call still references the original value inside of Dangle, since that stack frame hasn't been overwritten, and works as expected
	--After that call completes, you've overridden that stack frame with the stack frame used for Put_Line or Image (it doesn't matter which).
	Put_Line("Value is " & Integer'Image(Ptr.all)); --This call still dereferences the same address, but by this point that reference has been overwritten repeatedly, and will be a different value.
end demo;
