{: test that passing an array to a conformant array parameter
   with mismatched index types causes a fatal error }

{$d+}
program e124( output );

type
   smallInt =  1..10;

var
   a : array[0..10] of integer;
   a1: array[1..9]  of integer;
   a2: array[2..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;
end;
begin {e124}

   test(a1);  { OK - compatible index bounds }
   test(a2);  { OK - compatible index bounds }
   test(a);   { !!! incompatible index range }
   writeln( 'fails: conformant array index error is not detected' );

end. { e124 }

