xref: /minix3/external/bsd/llvm/dist/clang/test/Parser/pragma-loop.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -verify %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc // Note that this puts the expected lines before the directives to work around
4*0a6a1f1dSLionel Sambuc // limitations in the -verify mode.
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc template <int V, int I>
test_nontype_template_param(int * List,int Length)7*0a6a1f1dSLionel Sambuc void test_nontype_template_param(int *List, int Length) {
8*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize_width(V) interleave_count(I)
9*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
10*0a6a1f1dSLionel Sambuc     List[i] = i;
11*0a6a1f1dSLionel Sambuc   }
12*0a6a1f1dSLionel Sambuc 
13*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize_width(V + 4) interleave_count(I + 4)
14*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
15*0a6a1f1dSLionel Sambuc     List[i] = i;
16*0a6a1f1dSLionel Sambuc   }
17*0a6a1f1dSLionel Sambuc }
18*0a6a1f1dSLionel Sambuc 
19*0a6a1f1dSLionel Sambuc template <int V>
test_nontype_template_vectorize(int * List,int Length)20*0a6a1f1dSLionel Sambuc void test_nontype_template_vectorize(int *List, int Length) {
21*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid value '-1'; must be positive}} */ #pragma clang loop vectorize_width(V)
22*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
23*0a6a1f1dSLionel Sambuc     List[i] = i;
24*0a6a1f1dSLionel Sambuc   }
25*0a6a1f1dSLionel Sambuc 
26*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop vectorize_width(V / 2)
27*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
28*0a6a1f1dSLionel Sambuc     List[i] += i;
29*0a6a1f1dSLionel Sambuc   }
30*0a6a1f1dSLionel Sambuc }
31*0a6a1f1dSLionel Sambuc 
32*0a6a1f1dSLionel Sambuc template <int I>
test_nontype_template_interleave(int * List,int Length)33*0a6a1f1dSLionel Sambuc void test_nontype_template_interleave(int *List, int Length) {
34*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid value '-1'; must be positive}} */ #pragma clang loop interleave_count(I)
35*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
36*0a6a1f1dSLionel Sambuc     List[i] = i;
37*0a6a1f1dSLionel Sambuc   }
38*0a6a1f1dSLionel Sambuc 
39*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop interleave_count(2 % I)
40*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
41*0a6a1f1dSLionel Sambuc     List[i] = i;
42*0a6a1f1dSLionel Sambuc   }
43*0a6a1f1dSLionel Sambuc }
44*0a6a1f1dSLionel Sambuc 
45*0a6a1f1dSLionel Sambuc template <char V>
test_nontype_template_char(int * List,int Length)46*0a6a1f1dSLionel Sambuc void test_nontype_template_char(int *List, int Length) {
47*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid argument of type 'char'; expected an integer type}} */ #pragma clang loop vectorize_width(V)
48*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
49*0a6a1f1dSLionel Sambuc     List[i] = i;
50*0a6a1f1dSLionel Sambuc   }
51*0a6a1f1dSLionel Sambuc }
52*0a6a1f1dSLionel Sambuc 
53*0a6a1f1dSLionel Sambuc template <bool V>
test_nontype_template_bool(int * List,int Length)54*0a6a1f1dSLionel Sambuc void test_nontype_template_bool(int *List, int Length) {
55*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid argument of type 'bool'; expected an integer type}} */ #pragma clang loop vectorize_width(V)
56*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
57*0a6a1f1dSLionel Sambuc     List[i] = i;
58*0a6a1f1dSLionel Sambuc   }
59*0a6a1f1dSLionel Sambuc }
60*0a6a1f1dSLionel Sambuc 
61*0a6a1f1dSLionel Sambuc template <int V, int I>
test_nontype_template_badarg(int * List,int Length)62*0a6a1f1dSLionel Sambuc void test_nontype_template_badarg(int *List, int Length) {
63*0a6a1f1dSLionel Sambuc   /* expected-error {{use of undeclared identifier 'Vec'}} */ #pragma clang loop vectorize_width(Vec) interleave_count(I)
64*0a6a1f1dSLionel Sambuc   /* expected-error {{use of undeclared identifier 'Int'}} */ #pragma clang loop vectorize_width(V) interleave_count(Int)
65*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
66*0a6a1f1dSLionel Sambuc     List[i] = i;
67*0a6a1f1dSLionel Sambuc   }
68*0a6a1f1dSLionel Sambuc }
69*0a6a1f1dSLionel Sambuc 
70*0a6a1f1dSLionel Sambuc template <typename T>
test_type_template_vectorize(int * List,int Length)71*0a6a1f1dSLionel Sambuc void test_type_template_vectorize(int *List, int Length) {
72*0a6a1f1dSLionel Sambuc   const T Value = -1;
73*0a6a1f1dSLionel Sambuc   /* expected-error {{invalid value '-1'; must be positive}} */ #pragma clang loop vectorize_width(Value)
74*0a6a1f1dSLionel Sambuc   for (int i = 0; i < Length; i++) {
75*0a6a1f1dSLionel Sambuc     List[i] = i;
76*0a6a1f1dSLionel Sambuc   }
77*0a6a1f1dSLionel Sambuc }
78*0a6a1f1dSLionel Sambuc 
test(int * List,int Length)79*0a6a1f1dSLionel Sambuc void test(int *List, int Length) {
80*0a6a1f1dSLionel Sambuc   int i = 0;
81*0a6a1f1dSLionel Sambuc 
82*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize(enable)
83*0a6a1f1dSLionel Sambuc #pragma clang loop interleave(enable)
84*0a6a1f1dSLionel Sambuc #pragma clang loop unroll(full)
85*0a6a1f1dSLionel Sambuc   while (i + 1 < Length) {
86*0a6a1f1dSLionel Sambuc     List[i] = i;
87*0a6a1f1dSLionel Sambuc   }
88*0a6a1f1dSLionel Sambuc 
89*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize_width(4)
90*0a6a1f1dSLionel Sambuc #pragma clang loop interleave_count(8)
91*0a6a1f1dSLionel Sambuc #pragma clang loop unroll_count(16)
92*0a6a1f1dSLionel Sambuc   while (i < Length) {
93*0a6a1f1dSLionel Sambuc     List[i] = i;
94*0a6a1f1dSLionel Sambuc   }
95*0a6a1f1dSLionel Sambuc 
96*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize(disable)
97*0a6a1f1dSLionel Sambuc #pragma clang loop interleave(disable)
98*0a6a1f1dSLionel Sambuc #pragma clang loop unroll(disable)
99*0a6a1f1dSLionel Sambuc   while (i - 1 < Length) {
100*0a6a1f1dSLionel Sambuc     List[i] = i;
101*0a6a1f1dSLionel Sambuc   }
102*0a6a1f1dSLionel Sambuc 
103*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize_width(4) interleave_count(8) unroll_count(16)
104*0a6a1f1dSLionel Sambuc   while (i - 2 < Length) {
105*0a6a1f1dSLionel Sambuc     List[i] = i;
106*0a6a1f1dSLionel Sambuc   }
107*0a6a1f1dSLionel Sambuc 
108*0a6a1f1dSLionel Sambuc #pragma clang loop interleave_count(16)
109*0a6a1f1dSLionel Sambuc   while (i - 3 < Length) {
110*0a6a1f1dSLionel Sambuc     List[i] = i;
111*0a6a1f1dSLionel Sambuc   }
112*0a6a1f1dSLionel Sambuc 
113*0a6a1f1dSLionel Sambuc   int VList[Length];
114*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize(disable) interleave(disable) unroll(disable)
115*0a6a1f1dSLionel Sambuc   for (int j : VList) {
116*0a6a1f1dSLionel Sambuc     VList[j] = List[j];
117*0a6a1f1dSLionel Sambuc   }
118*0a6a1f1dSLionel Sambuc 
119*0a6a1f1dSLionel Sambuc   test_nontype_template_param<4, 8>(List, Length);
120*0a6a1f1dSLionel Sambuc 
121*0a6a1f1dSLionel Sambuc /* expected-error {{expected '('}} */ #pragma clang loop vectorize
122*0a6a1f1dSLionel Sambuc /* expected-error {{expected '('}} */ #pragma clang loop interleave
123*0a6a1f1dSLionel Sambuc /* expected-error {{expected '('}} */ #pragma clang loop unroll
124*0a6a1f1dSLionel Sambuc 
125*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop vectorize(enable
126*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop interleave(enable
127*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop unroll(full
128*0a6a1f1dSLionel Sambuc 
129*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop vectorize_width(4
130*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop interleave_count(4
131*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop unroll_count(4
132*0a6a1f1dSLionel Sambuc 
133*0a6a1f1dSLionel Sambuc /* expected-error {{missing argument; expected 'enable' or 'disable'}} */ #pragma clang loop vectorize()
134*0a6a1f1dSLionel Sambuc /* expected-error {{missing argument; expected an integer value}} */ #pragma clang loop interleave_count()
135*0a6a1f1dSLionel Sambuc /* expected-error {{missing argument; expected 'enable' or 'disable'}} */ #pragma clang loop unroll()
136*0a6a1f1dSLionel Sambuc 
137*0a6a1f1dSLionel Sambuc /* expected-error {{missing option; expected vectorize, vectorize_width, interleave, interleave_count, unroll, or unroll_count}} */ #pragma clang loop
138*0a6a1f1dSLionel Sambuc /* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop badkeyword
139*0a6a1f1dSLionel Sambuc /* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop badkeyword(enable)
140*0a6a1f1dSLionel Sambuc /* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop vectorize(enable) badkeyword(4)
141*0a6a1f1dSLionel Sambuc /* expected-warning {{extra tokens at end of '#pragma clang loop'}} */ #pragma clang loop vectorize(enable) ,
142*0a6a1f1dSLionel Sambuc   while (i-4 < Length) {
143*0a6a1f1dSLionel Sambuc     List[i] = i;
144*0a6a1f1dSLionel Sambuc   }
145*0a6a1f1dSLionel Sambuc 
146*0a6a1f1dSLionel Sambuc /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop vectorize_width(0)
147*0a6a1f1dSLionel Sambuc /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop interleave_count(0)
148*0a6a1f1dSLionel Sambuc /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop unroll_count(0)
149*0a6a1f1dSLionel Sambuc 
150*0a6a1f1dSLionel Sambuc /* expected-error {{expression is not an integral constant expression}} expected-note {{division by zero}} */ #pragma clang loop vectorize_width(10 / 0)
151*0a6a1f1dSLionel Sambuc /* expected-error {{invalid value '0'; must be positive}} */ #pragma clang loop interleave_count(10 / 5 - 2)
152*0a6a1f1dSLionel Sambuc   while (i-5 < Length) {
153*0a6a1f1dSLionel Sambuc     List[i] = i;
154*0a6a1f1dSLionel Sambuc   }
155*0a6a1f1dSLionel Sambuc 
156*0a6a1f1dSLionel Sambuc test_nontype_template_vectorize<4>(List, Length);
157*0a6a1f1dSLionel Sambuc /* expected-note {{in instantiation of function template specialization}} */ test_nontype_template_vectorize<-1>(List, Length);
158*0a6a1f1dSLionel Sambuc test_nontype_template_interleave<8>(List, Length);
159*0a6a1f1dSLionel Sambuc /* expected-note {{in instantiation of function template specialization}} */ test_nontype_template_interleave<-1>(List, Length);
160*0a6a1f1dSLionel Sambuc 
161*0a6a1f1dSLionel Sambuc /* expected-note {{in instantiation of function template specialization}} */ test_nontype_template_char<'A'>(List, Length); // Loop hint arg cannot be a char.
162*0a6a1f1dSLionel Sambuc /* expected-note {{in instantiation of function template specialization}} */ test_nontype_template_bool<true>(List, Length);  // Or a bool.
163*0a6a1f1dSLionel Sambuc /* expected-note {{in instantiation of function template specialization}} */ test_type_template_vectorize<int>(List, Length); // Or a template type.
164*0a6a1f1dSLionel Sambuc 
165*0a6a1f1dSLionel Sambuc /* expected-error {{value '3000000000' is too large}} */ #pragma clang loop vectorize_width(3000000000)
166*0a6a1f1dSLionel Sambuc /* expected-error {{value '3000000000' is too large}} */ #pragma clang loop interleave_count(3000000000)
167*0a6a1f1dSLionel Sambuc /* expected-error {{value '3000000000' is too large}} */ #pragma clang loop unroll_count(3000000000)
168*0a6a1f1dSLionel Sambuc   while (i-6 < Length) {
169*0a6a1f1dSLionel Sambuc     List[i] = i;
170*0a6a1f1dSLionel Sambuc   }
171*0a6a1f1dSLionel Sambuc 
172*0a6a1f1dSLionel Sambuc /* expected-warning {{extra tokens at end of '#pragma clang loop'}} */ #pragma clang loop vectorize_width(1 +) 1
173*0a6a1f1dSLionel Sambuc /* expected-warning {{extra tokens at end of '#pragma clang loop'}} */ #pragma clang loop vectorize_width(1) +1
174*0a6a1f1dSLionel Sambuc const int VV = 4;
175*0a6a1f1dSLionel Sambuc /* expected-error {{expected expression}} */ #pragma clang loop vectorize_width(VV +/ 2)
176*0a6a1f1dSLionel Sambuc /* expected-error {{use of undeclared identifier 'undefined'}} */ #pragma clang loop vectorize_width(VV+undefined)
177*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop vectorize_width(1+(^*/2 * ()
178*0a6a1f1dSLionel Sambuc /* expected-warning {{extra tokens at end of '#pragma clang loop' - ignored}} */ #pragma clang loop vectorize_width(1+(-0[0]))))))
179*0a6a1f1dSLionel Sambuc 
180*0a6a1f1dSLionel Sambuc /* expected-error {{use of undeclared identifier 'badvalue'}} */ #pragma clang loop vectorize_width(badvalue)
181*0a6a1f1dSLionel Sambuc /* expected-error {{use of undeclared identifier 'badvalue'}} */ #pragma clang loop interleave_count(badvalue)
182*0a6a1f1dSLionel Sambuc /* expected-error {{use of undeclared identifier 'badvalue'}} */ #pragma clang loop unroll_count(badvalue)
183*0a6a1f1dSLionel Sambuc   while (i-6 < Length) {
184*0a6a1f1dSLionel Sambuc     List[i] = i;
185*0a6a1f1dSLionel Sambuc   }
186*0a6a1f1dSLionel Sambuc 
187*0a6a1f1dSLionel Sambuc /* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop vectorize(badidentifier)
188*0a6a1f1dSLionel Sambuc /* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop interleave(badidentifier)
189*0a6a1f1dSLionel Sambuc /* expected-error {{invalid argument; expected 'full' or 'disable'}} */ #pragma clang loop unroll(badidentifier)
190*0a6a1f1dSLionel Sambuc   while (i-7 < Length) {
191*0a6a1f1dSLionel Sambuc     List[i] = i;
192*0a6a1f1dSLionel Sambuc   }
193*0a6a1f1dSLionel Sambuc 
194*0a6a1f1dSLionel Sambuc // PR20069 - Loop pragma arguments that are not identifiers or numeric
195*0a6a1f1dSLionel Sambuc // constants crash FE.
196*0a6a1f1dSLionel Sambuc /* expected-error {{expected ')'}} */ #pragma clang loop vectorize(()
197*0a6a1f1dSLionel Sambuc /* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop interleave(*)
198*0a6a1f1dSLionel Sambuc /* expected-error {{invalid argument; expected 'full' or 'disable'}} */ #pragma clang loop unroll(=)
199*0a6a1f1dSLionel Sambuc /* expected-error {{type name requires a specifier or qualifier}} expected-error {{expected expression}} */ #pragma clang loop vectorize_width(^)
200*0a6a1f1dSLionel Sambuc /* expected-error {{expected expression}} expected-error {{expected expression}} */ #pragma clang loop interleave_count(/)
201*0a6a1f1dSLionel Sambuc /* expected-error {{expected expression}} expected-error {{expected expression}} */ #pragma clang loop unroll_count(==)
202*0a6a1f1dSLionel Sambuc   while (i-8 < Length) {
203*0a6a1f1dSLionel Sambuc     List[i] = i;
204*0a6a1f1dSLionel Sambuc   }
205*0a6a1f1dSLionel Sambuc 
206*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize(enable)
207*0a6a1f1dSLionel Sambuc /* expected-error {{expected a for, while, or do-while loop to follow '#pragma clang loop'}} */ int j = Length;
208*0a6a1f1dSLionel Sambuc   List[0] = List[1];
209*0a6a1f1dSLionel Sambuc 
210*0a6a1f1dSLionel Sambuc   while (j-1 < Length) {
211*0a6a1f1dSLionel Sambuc     List[j] = j;
212*0a6a1f1dSLionel Sambuc   }
213*0a6a1f1dSLionel Sambuc 
214*0a6a1f1dSLionel Sambuc // FIXME: A bug in ParsedAttributes causes the order of the attributes to be
215*0a6a1f1dSLionel Sambuc // processed in reverse. Consequently, the errors occur on the first of pragma
216*0a6a1f1dSLionel Sambuc // of the next three tests rather than the last, and the order of the kinds
217*0a6a1f1dSLionel Sambuc // is also reversed.
218*0a6a1f1dSLionel Sambuc 
219*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize_width(4)
220*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize(disable)
221*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave_count(4)
222*0a6a1f1dSLionel Sambuc #pragma clang loop interleave(disable)
223*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)
224*0a6a1f1dSLionel Sambuc #pragma clang loop unroll(disable)
225*0a6a1f1dSLionel Sambuc   while (i-8 < Length) {
226*0a6a1f1dSLionel Sambuc     List[i] = i;
227*0a6a1f1dSLionel Sambuc   }
228*0a6a1f1dSLionel Sambuc 
229*0a6a1f1dSLionel Sambuc /* expected-error {{duplicate directives 'vectorize(disable)' and 'vectorize(enable)'}} */ #pragma clang loop vectorize(enable)
230*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize(disable)
231*0a6a1f1dSLionel Sambuc /* expected-error {{duplicate directives 'interleave(disable)' and 'interleave(enable)'}} */ #pragma clang loop interleave(enable)
232*0a6a1f1dSLionel Sambuc #pragma clang loop interleave(disable)
233*0a6a1f1dSLionel Sambuc /* expected-error {{duplicate directives 'unroll(disable)' and 'unroll(full)'}} */ #pragma clang loop unroll(full)
234*0a6a1f1dSLionel Sambuc #pragma clang loop unroll(disable)
235*0a6a1f1dSLionel Sambuc   while (i-9 < Length) {
236*0a6a1f1dSLionel Sambuc     List[i] = i;
237*0a6a1f1dSLionel Sambuc   }
238*0a6a1f1dSLionel Sambuc 
239*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize(disable)
240*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize_width(4)
241*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave(disable)
242*0a6a1f1dSLionel Sambuc #pragma clang loop interleave_count(4)
243*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll(disable)
244*0a6a1f1dSLionel Sambuc #pragma clang loop unroll_count(4)
245*0a6a1f1dSLionel Sambuc   while (i-10 < Length) {
246*0a6a1f1dSLionel Sambuc     List[i] = i;
247*0a6a1f1dSLionel Sambuc   }
248*0a6a1f1dSLionel Sambuc 
249*0a6a1f1dSLionel Sambuc /* expected-error {{duplicate directives 'vectorize_width(4)' and 'vectorize_width(8)'}} */ #pragma clang loop vectorize_width(8)
250*0a6a1f1dSLionel Sambuc #pragma clang loop vectorize_width(4)
251*0a6a1f1dSLionel Sambuc /* expected-error {{duplicate directives 'interleave_count(4)' and 'interleave_count(8)'}} */ #pragma clang loop interleave_count(8)
252*0a6a1f1dSLionel Sambuc #pragma clang loop interleave_count(4)
253*0a6a1f1dSLionel Sambuc /* expected-error {{duplicate directives 'unroll_count(4)' and 'unroll_count(8)'}} */ #pragma clang loop unroll_count(8)
254*0a6a1f1dSLionel Sambuc #pragma clang loop unroll_count(4)
255*0a6a1f1dSLionel Sambuc   while (i-11 < Length) {
256*0a6a1f1dSLionel Sambuc     List[i] = i;
257*0a6a1f1dSLionel Sambuc   }
258*0a6a1f1dSLionel Sambuc 
259*0a6a1f1dSLionel Sambuc 
260*0a6a1f1dSLionel Sambuc /* expected-error {{incompatible directives 'unroll(full)' and 'unroll_count(4)'}} */ #pragma clang loop unroll(full)
261*0a6a1f1dSLionel Sambuc #pragma clang loop unroll_count(4)
262*0a6a1f1dSLionel Sambuc   while (i-11 < Length) {
263*0a6a1f1dSLionel Sambuc     List[i] = i;
264*0a6a1f1dSLionel Sambuc   }
265*0a6a1f1dSLionel Sambuc 
266*0a6a1f1dSLionel Sambuc #pragma clang loop interleave(enable)
267*0a6a1f1dSLionel Sambuc /* expected-error {{expected statement}} */ }
268