{: test that a non-ordinal index type in a conformant array parameter
   is handled gracefully }

{$d+}
program e136( output );

type
   smallInt = 1..10;
   smallStr = packed array[smallInt] of char;

var
   a0: array[smallInt] of integer;
   a1: array[smallInt] of integer;
   a2: array[smallInt] of integer;
   a3: array[smallInt] 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;

{ !!!  bad index type               ------v------- }
procedure test0(aa : array[ lo .. hi : smallStr] of integer);
begin
   writeln( 'fails: conformant array error is not detected' );
end;

begin {e136}

   test(a1);  { OK }

end. { e136 }

