| 1 |
-- { dg-do compile } |
| 2 |
-- { dg-options "-cargs --param max-completely-peeled-insns=200 -margs -O3" } |
| 3 |
|
| 4 |
package body Opt42 is |
| 5 |
|
| 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 "*"; |
| 21 |
|
| 22 |
end Opt42; |