2 -- { dg-options "-O -fdump-tree-cunroll-details" }
4 package body Unroll3
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 "note: loop with 3 iterations completely unrolled" 2 "cunroll" } }