aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/array37.adb
blob: f1ee385d1a55a48473aa68b2c119cd7ee85cb79f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- { dg-do run }
-- { dg-options "-O" }

procedure Array37 is

  type Arr is array (Integer range -1 .. 1) of Integer;

  A : Arr := (-100, 0, 100);

  function Ident (I : Integer) return Integer IS
  begin
    return I;
  end;

begin
  if Ident (A (1)) <= Ident (A (0)) then
    raise Program_Error;
  end if;
end;