2 -- { dg-options "-O2 -funroll-all-loops -fdump-rtl-loop2_unroll-details -fdump-tree-cunrolli-details" }
4 package body Unroll1
is
6 function "+" (X
, Y
: Sarray
) return Sarray
is
9 for I
in Sarray
'Range loop
10 pragma Loop_Optimize
(No_Unroll
);
16 procedure Add
(X
, Y
: Sarray
; R
: out Sarray
) is
18 for I
in Sarray
'Range loop
19 pragma Loop_Optimize
(No_Unroll
);
26 -- { dg-final { scan-tree-dump-times "Not unrolling loop .: user didn't want it unrolled completely" 2 "cunrolli" } }
27 -- { dg-final { scan-rtl-dump-times "Not unrolling loop, user didn't want it unrolled" 2 "loop2_unroll" } }