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

{$d+}
program d105( output );

type
   smallInt =  1..10;

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

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

procedure test1(aa1 : array[lo1..hi1 : integer] of integer);
begin
   test(aa1); { !!! lower bound overrun }
end; { test1 }

begin {d105}

   test1(a);

end. { d105 }

