PR target/84336
[official-gcc.git] / gcc / testsuite / gnat.dg / opt42.adb
blob620f61a5b96813bac63e514970552446dad9ca46
1 -- { dg-do compile }
2 -- { dg-options "-cargs --param max-completely-peeled-insns=200 -margs -O3" }
4 package body Opt42 is
6 function "*" (Left, Right : in Array_Type) return Array_Type is
7 Temp : Float;
8 Result : Array_Type;
9 begin
10 for I in Index_Type loop
11 for J in Index_Type loop
12 Temp := 0.0;
13 for K in Index_Type loop
14 Temp := Temp + Left (I) (K) * Right (K) (J);
15 end loop;
16 Result (I) (J) := Temp;
17 end loop;
18 end loop;
19 return Result;
20 end "*";
22 end Opt42;