summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/loop_optimization3.adb
blob: e69f535fb0564276b85032619bb1a758964a42a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- { dg-do run }
-- { dg-options "-O" }

with Loop_Optimization3_Pkg; use Loop_Optimization3_Pkg;

procedure Loop_Optimization3 is

  type Arr is array (Integer range -3 .. 3) of Integer;
  C : constant Arr := (1, others => F(2));

begin
  if C /= (1, 2, 2, 2, 2, 2, 2) then
    raise Program_Error;
  end if;
end;