blob: 957b715ff7de01beec8dcd48dd5936be6a227f6b [file] [log] [blame]
-- { dg-do compile }
-- { dg-options "-O -fdump-tree-optimized" }
package body Loop_Optimization21 is
function Min (X : in Item_Vector) return Item is
Tmp_Min : Item;
begin
Tmp_Min := X (X'First);
for I in X'First + 1 .. X'Last loop
if X (I) <= Tmp_Min then
Tmp_Min := X (I);
end if;
end loop;
return Tmp_Min;
end Min;
end Loop_Optimization21;
-- { dg-final { scan-tree-dump-times "Index_Check" 1 "optimized" } }