
{: test that disposing the same memory twice causes a fatal error }

{$d+}
program d002( output );

var
   p1 : ^real;
   p2 : ^integer;
begin
   new(p1);
   p1^ := 100.6;
   new(p2);
   p2^ := 91;
   writeln( 'p1^ is ', p1^:1:1, ', p2^ is ', p2^:1 );
   dispose(p1);
   dispose(p1); {!!! p1 is already disposed}
   dispose(p2);
end. { d002 }

