PR debug/66535
[official-gcc.git] / gcc / testsuite / gnat.dg / opt5.adb
blob73a21bde02370ba0e0b8579a50d3d7d5f880ba0f
1 -- { dg-do run }
2 -- { dg-options "-O2" }
4 procedure Opt5 is
6 type Varray is array (1 .. 4) of Natural;
8 procedure Check_All_Ones (A : Varray) is
9 begin
10 for J in A'Range loop
11 if (A (J)) /= 1 then
12 raise Program_Error;
13 end if;
14 end loop;
15 end;
17 X : constant Varray := (1, 1, 1, 1);
19 begin
20 Check_All_Ones (X);
21 end;