{: test that accessing a conformant array outside its bounds causes a fatal error }

{$d+}
program d101( output );

var
   a : array[1..10] of integer;

procedure test1(aa : array[lo..hi : integer] of integer);
begin
   aa[hi] := 3;    { OK }
   aa[hi+1] := 3;  { !!! access above upper bound }
   writeln( 'fails: access conformant array error is not detected' );
end; { test1 }

procedure test(var aa : array[lo..hi : integer] of integer);
begin
   test1(aa);
end; { test }

begin {d101}

   test(a);

end. { d101 }

