runtime: copy more of scheduler from Go 1.7 runtime
[official-gcc.git] / gcc / testsuite / gnat.dg / vect5.adb
blobdbeb8138275d956c82e55643ba9644659a4c9cac
1 -- { dg-do compile { target i?86-*-* x86_64-*-* } }
2 -- { dg-options "-O3 -msse2 -fno-vect-cost-model -fdump-tree-vect-details" }
4 package body Vect5 is
6 function "+" (X : Varray; Y : Long_Float) return Varray is
7 R : Varray (X'Range);
8 begin
9 for I in X'Range loop
10 R(I) := X(I) + Y;
11 end loop;
12 return R;
13 end;
15 procedure Add (X : Varray; Y : Long_Float; R : out Varray) is
16 begin
17 for I in X'Range loop
18 R(I) := X(I) + Y;
19 end loop;
20 end;
22 procedure Add (X : not null access Varray; Y : Long_Float; R : not null access Varray) is
23 begin
24 for I in X'Range loop
25 R(I) := X(I) + Y;
26 end loop;
27 end;
30 function "+" (X : Sarray; Y : Long_Float) return Sarray is
31 R : Sarray;
32 begin
33 for I in Sarray'Range loop
34 R(I) := X(I) + Y;
35 end loop;
36 return R;
37 end;
39 procedure Add (X : Sarray; Y : Long_Float; R : out Sarray) is
40 begin
41 for I in Sarray'Range loop
42 R(I) := X(I) + Y;
43 end loop;
44 end;
46 procedure Add (X : not null access Sarray; Y : Long_Float; R : not null access Sarray) is
47 begin
48 for I in Sarray'Range loop
49 R(I) := X(I) + Y;
50 end loop;
51 end;
54 function "+" (X : Darray1; Y : Long_Float) return Darray1 is
55 R : Darray1;
56 begin
57 for I in Darray1'Range loop
58 R(I) := X(I) + Y;
59 end loop;
60 return R;
61 end;
63 procedure Add (X : Darray1; Y : Long_Float; R : out Darray1) is
64 begin
65 for I in Darray1'Range loop
66 R(I) := X(I) + Y;
67 end loop;
68 end;
70 procedure Add (X : not null access Darray1; Y : Long_Float; R : not null access Darray1) is
71 begin
72 for I in Darray1'Range loop
73 R(I) := X(I) + Y;
74 end loop;
75 end;
78 function "+" (X : Darray2; Y : Long_Float) return Darray2 is
79 R : Darray2;
80 begin
81 for I in Darray2'Range loop
82 R(I) := X(I) + Y;
83 end loop;
84 return R;
85 end;
87 procedure Add (X : Darray2; Y : Long_Float; R : out Darray2) is
88 begin
89 for I in Darray2'Range loop
90 R(I) := X(I) + Y;
91 end loop;
92 end;
94 procedure Add (X : not null access Darray2; Y : Long_Float; R : not null access Darray2) is
95 begin
96 for I in Darray2'Range loop
97 R(I) := X(I) + Y;
98 end loop;
99 end;
102 function "+" (X : Darray3; Y : Long_Float) return Darray3 is
103 R : Darray3;
104 begin
105 for I in Darray3'Range loop
106 R(I) := X(I) + Y;
107 end loop;
108 return R;
109 end;
111 procedure Add (X : Darray3; Y : Long_Float; R : out Darray3) is
112 begin
113 for I in Darray3'Range loop
114 R(I) := X(I) + Y;
115 end loop;
116 end;
118 procedure Add (X : not null access Darray3; Y : Long_Float; R : not null access Darray3) is
119 begin
120 for I in Darray3'Range loop
121 R(I) := X(I) + Y;
122 end loop;
123 end;
125 end Vect5;
127 -- { dg-final { scan-tree-dump-times "vectorized 1 loops" 15 "vect" } }