summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/loop_optimization10.adb
blob: 3b8e8949e1a2631d80e7720a21d6bdadfc4370d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- { dg-do compile }
-- { dg-options "-O3" }
-- { dg-options "-O3 -msse2" { target i?86-*-* x86_64-*-* } }

package body Loop_Optimization10 is

   function F (Low, High : in Array_Real_Type) return Array_Limit_Type is
      Result : Array_Limit_Type;
   begin
      for I in Result'Range
      loop
         Result (I) := F (Low (I), High (I));
      end loop;
      return Result;
   end;

end Loop_Optimization10;