2 -- { dg-options "-O2 -fdump-tree-cunrolli-details" }
4 package body Unroll2
is
6 function "+" (X
, Y
: Sarray
) return Sarray
is
9 for I
in Sarray
'Range loop
10 pragma Loop_Optimize
(Unroll
);
16 procedure Add
(X
, Y
: Sarray
; R
: out Sarray
) is
18 for I
in Sarray
'Range loop
19 pragma Loop_Optimize
(Unroll
);
26 -- { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 2 "cunrolli" } }