1-- { dg-do compile } 2-- { dg-options "-O -fdump-tree-optimized" } 3 4pragma Overflow_Mode (Minimized); 5 6package body Loop_Optimization22 is 7 8 procedure Foo (X : Discrim_Type) is 9 H : array (1 .. Integer (X.Count) + 1) of Float; 10 begin 11 for I in 1 .. X.Count loop 12 H (Integer(I) + 1):= 0.0; 13 end loop; 14 end; 15 16end Loop_Optimization22; 17 18-- { dg-final { scan-tree-dump-not "Index_Check" "optimized" } } 19