Fix internal error on function call returning extension of limited interface
[official-gcc.git] / gcc / testsuite / gnat.dg / array37.adb
blobf1ee385d1a55a48473aa68b2c119cd7ee85cb79f
1 -- { dg-do run }
2 -- { dg-options "-O" }
4 procedure Array37 is
6 type Arr is array (Integer range -1 .. 1) of Integer;
8 A : Arr := (-100, 0, 100);
10 function Ident (I : Integer) return Integer IS
11 begin
12 return I;
13 end;
15 begin
16 if Ident (A (1)) <= Ident (A (0)) then
17 raise Program_Error;
18 end if;
19 end;