1-- { dg-do run } 2-- { dg-options "-O2" } 3 4procedure Opt5 is 5 6 type Varray is array (1 .. 4) of Natural; 7 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; 16 17 X : constant Varray := (1, 1, 1, 1); 18 19begin 20 Check_All_Ones (X); 21end; 22