
{: test that accessing an invalid pointer causes a fatal error }

{$d+}
program d006( output );

var
   myRec :  record
               case boolean of
                 true  : ( i: integer);
                 false : ( p: ^real);
               end; {record }
begin

   new(myRec.p);
   myRec.p^ := 100.6;
   write( 'nr is ', myRec.p^:1:1 );
   myRec.i := -1;
   write( ', integer is ', myRec.i );
   write( ', real is ', myRec.p^ );
   writeln( 'use of invalid pointer not detected' );
end. { d006 }

