{: test that passing an array to a conformant array parameter
   with incorrect bounds causes a fatal error }

{$d+}
program d103( output );

type
   smallInt =  1..10;

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

procedure test1(aa : array[lo..hi : smallInt] of integer);
var
   z   : smallInt;
begin
   z := hi;
   aa[z] := 3;
   aa[lo] := 3;
   writeln( 'fails: conformant array bounds error is not detected' );
end; { test1 }

procedure test2(aa : array[lo..hi : integer] of integer);
begin
   test1(aa);  { !!! bounds exceeded }
end;

begin {d103}

   test2(a);

end. { d103 }

