Wattributes-10.c: Add -fno-common option on hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gnat.dg / unroll2.adb
blob1d3a75706de5acfdf9bb211cb731a9bd1cda5b71
1 -- { dg-do compile }
2 -- { dg-options "-O2 -fdump-tree-cunrolli-details" }
4 package body Unroll2 is
6 function "+" (X, Y : Sarray) return Sarray is
7 R : Sarray;
8 begin
9 for I in Sarray'Range loop
10 pragma Loop_Optimize (Unroll);
11 R(I) := X(I) + Y(I);
12 end loop;
13 return R;
14 end;
16 procedure Add (X, Y : Sarray; R : out Sarray) is
17 begin
18 for I in Sarray'Range loop
19 pragma Loop_Optimize (Unroll);
20 R(I) := X(I) + Y(I);
21 end loop;
22 end;
24 end Unroll2;
26 -- { dg-final { scan-tree-dump-times "loop with 3 iterations completely unrolled" 2 "cunrolli" } }