1-- { dg-do run } 2-- { dg-options "-O" } 3 4procedure Opt30 is 5 6 function Id_I (I : Integer) return Integer is 7 begin 8 return I; 9 end; 10 11 A : array (Integer range -4..4) of Integer; 12 13begin 14 A := (-ID_I(4), -ID_I(3), -ID_I(2), -ID_I(1), ID_I(100), 15 ID_I(1), ID_I(2), ID_I(3), ID_I(4)); 16 A(-4..0) := A(0..4); 17 if A /= (100, 1, 2, 3, 4, 1, 2, 3, 4) then 18 raise Program_Error; 19 end if; 20end; 21