1*67e74705SXin Li // RUN: %clang_cc1 -verify -fopenmp %s
2*67e74705SXin Li // RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s
3*67e74705SXin Li // RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s
4*67e74705SXin Li
foo()5*67e74705SXin Li void foo() {
6*67e74705SXin Li }
7*67e74705SXin Li
foobool(int argc)8*67e74705SXin Li bool foobool(int argc) {
9*67e74705SXin Li return argc;
10*67e74705SXin Li }
11*67e74705SXin Li
12*67e74705SXin Li struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
13*67e74705SXin Li extern S1 a;
14*67e74705SXin Li class S2 {
15*67e74705SXin Li mutable int a;
operator +(const S2 & arg)16*67e74705SXin Li S2 &operator+(const S2 &arg) { return (*this); } // expected-note 3 {{implicitly declared private here}}
17*67e74705SXin Li
18*67e74705SXin Li public:
S2()19*67e74705SXin Li S2() : a(0) {}
S2(S2 & s2)20*67e74705SXin Li S2(S2 &s2) : a(s2.a) {}
21*67e74705SXin Li static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
22*67e74705SXin Li static const float S2sc;
23*67e74705SXin Li };
24*67e74705SXin Li const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
25*67e74705SXin Li S2 b; // expected-note 3 {{'b' defined here}}
26*67e74705SXin Li const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
27*67e74705SXin Li class S3 {
28*67e74705SXin Li int a;
29*67e74705SXin Li
30*67e74705SXin Li public:
31*67e74705SXin Li int b;
S3()32*67e74705SXin Li S3() : a(0) {}
S3(const S3 & s3)33*67e74705SXin Li S3(const S3 &s3) : a(s3.a) {}
operator +(const S3 & arg1)34*67e74705SXin Li S3 operator+(const S3 &arg1) { return arg1; }
35*67e74705SXin Li };
operator +(const S3 & arg1,const S3 & arg2)36*67e74705SXin Li int operator+(const S3 &arg1, const S3 &arg2) { return 5; }
37*67e74705SXin Li S3 c; // expected-note 3 {{'c' defined here}}
38*67e74705SXin Li const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
39*67e74705SXin Li extern const int f; // expected-note 4 {{'f' declared here}}
40*67e74705SXin Li class S4 {
41*67e74705SXin Li int a;
42*67e74705SXin Li S4(); // expected-note {{implicitly declared private here}}
43*67e74705SXin Li S4(const S4 &s4);
operator +(const S4 & arg)44*67e74705SXin Li S4 &operator+(const S4 &arg) { return (*this); }
45*67e74705SXin Li
46*67e74705SXin Li public:
S4(int v)47*67e74705SXin Li S4(int v) : a(v) {}
48*67e74705SXin Li };
operator &=(S4 & arg1,S4 & arg2)49*67e74705SXin Li S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
50*67e74705SXin Li class S5 {
51*67e74705SXin Li int a;
S5()52*67e74705SXin Li S5() : a(0) {} // expected-note {{implicitly declared private here}}
S5(const S5 & s5)53*67e74705SXin Li S5(const S5 &s5) : a(s5.a) {}
54*67e74705SXin Li S5 &operator+(const S5 &arg);
55*67e74705SXin Li
56*67e74705SXin Li public:
S5(int v)57*67e74705SXin Li S5(int v) : a(v) {}
58*67e74705SXin Li };
59*67e74705SXin Li class S6 { // expected-note 3 {{candidate function (the implicit copy assignment operator) not viable: no known conversion from 'int' to 'const S6' for 1st argument}}
60*67e74705SXin Li #if __cplusplus >= 201103L // C++11 or later
61*67e74705SXin Li // expected-note@-2 3 {{candidate function (the implicit move assignment operator) not viable}}
62*67e74705SXin Li #endif
63*67e74705SXin Li int a;
64*67e74705SXin Li
65*67e74705SXin Li public:
S6()66*67e74705SXin Li S6() : a(6) {}
operator int()67*67e74705SXin Li operator int() { return 6; }
68*67e74705SXin Li } o;
69*67e74705SXin Li
70*67e74705SXin Li S3 h, k;
71*67e74705SXin Li #pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
72*67e74705SXin Li
73*67e74705SXin Li template <class T> // expected-note {{declared here}}
tmain(T argc)74*67e74705SXin Li T tmain(T argc) {
75*67e74705SXin Li const T d = T(); // expected-note 4 {{'d' defined here}}
76*67e74705SXin Li const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
77*67e74705SXin Li T qa[5] = {T()};
78*67e74705SXin Li T i;
79*67e74705SXin Li T &j = i; // expected-note 4 {{'j' defined here}}
80*67e74705SXin Li S3 &p = k; // expected-note 2 {{'p' defined here}}
81*67e74705SXin Li const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
82*67e74705SXin Li T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
83*67e74705SXin Li T fl;
84*67e74705SXin Li #pragma omp simd reduction // expected-error {{expected '(' after 'reduction'}}
85*67e74705SXin Li for (int i = 0; i < 10; ++i)
86*67e74705SXin Li foo();
87*67e74705SXin Li #pragma omp simd reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
88*67e74705SXin Li for (int i = 0; i < 10; ++i)
89*67e74705SXin Li foo();
90*67e74705SXin Li #pragma omp simd reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
91*67e74705SXin Li for (int i = 0; i < 10; ++i)
92*67e74705SXin Li foo();
93*67e74705SXin Li #pragma omp simd reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
94*67e74705SXin Li for (int i = 0; i < 10; ++i)
95*67e74705SXin Li foo();
96*67e74705SXin Li #pragma omp simd reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
97*67e74705SXin Li for (int i = 0; i < 10; ++i)
98*67e74705SXin Li foo();
99*67e74705SXin Li #pragma omp simd reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
100*67e74705SXin Li for (int i = 0; i < 10; ++i)
101*67e74705SXin Li foo();
102*67e74705SXin Li #pragma omp simd reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
103*67e74705SXin Li for (int i = 0; i < 10; ++i)
104*67e74705SXin Li foo();
105*67e74705SXin Li #pragma omp simd reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
106*67e74705SXin Li for (int i = 0; i < 10; ++i)
107*67e74705SXin Li foo();
108*67e74705SXin Li #pragma omp simd reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
109*67e74705SXin Li for (int i = 0; i < 10; ++i)
110*67e74705SXin Li foo();
111*67e74705SXin Li #pragma omp simd reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}}
112*67e74705SXin Li for (int i = 0; i < 10; ++i)
113*67e74705SXin Li foo();
114*67e74705SXin Li #pragma omp simd reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}}
115*67e74705SXin Li for (int i = 0; i < 10; ++i)
116*67e74705SXin Li foo();
117*67e74705SXin Li #pragma omp simd reduction(&& : argc)
118*67e74705SXin Li for (int i = 0; i < 10; ++i)
119*67e74705SXin Li foo();
120*67e74705SXin Li #pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
121*67e74705SXin Li for (int i = 0; i < 10; ++i)
122*67e74705SXin Li foo();
123*67e74705SXin Li #pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified list item cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}}
124*67e74705SXin Li for (int i = 0; i < 10; ++i)
125*67e74705SXin Li foo();
126*67e74705SXin Li #pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified list item cannot be reduction}}
127*67e74705SXin Li for (int i = 0; i < 10; ++i)
128*67e74705SXin Li foo();
129*67e74705SXin Li #pragma omp simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
130*67e74705SXin Li for (int i = 0; i < 10; ++i)
131*67e74705SXin Li foo();
132*67e74705SXin Li #pragma omp simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}}
133*67e74705SXin Li for (int i = 0; i < 10; ++i)
134*67e74705SXin Li foo();
135*67e74705SXin Li #pragma omp simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}}
136*67e74705SXin Li for (int i = 0; i < 10; ++i)
137*67e74705SXin Li foo();
138*67e74705SXin Li #pragma omp simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}}
139*67e74705SXin Li for (int i = 0; i < 10; ++i)
140*67e74705SXin Li foo();
141*67e74705SXin Li #pragma omp simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
142*67e74705SXin Li for (int i = 0; i < 10; ++i)
143*67e74705SXin Li foo();
144*67e74705SXin Li #pragma omp simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
145*67e74705SXin Li for (int i = 0; i < 10; ++i)
146*67e74705SXin Li foo();
147*67e74705SXin Li #pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}}
148*67e74705SXin Li for (int i = 0; i < 10; ++i)
149*67e74705SXin Li foo();
150*67e74705SXin Li #pragma omp simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
151*67e74705SXin Li for (int i = 0; i < 10; ++i)
152*67e74705SXin Li foo();
153*67e74705SXin Li #pragma omp simd reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
154*67e74705SXin Li for (int i = 0; i < 10; ++i)
155*67e74705SXin Li foo();
156*67e74705SXin Li #pragma omp simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
157*67e74705SXin Li for (int i = 0; i < 10; ++i)
158*67e74705SXin Li foo();
159*67e74705SXin Li #pragma omp simd reduction(+ : j), reduction(+ : q) // OK
160*67e74705SXin Li for (int i = 0; i < 10; ++i)
161*67e74705SXin Li foo();
162*67e74705SXin Li #pragma omp parallel private(k)
163*67e74705SXin Li #pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
164*67e74705SXin Li for (int i = 0; i < 10; ++i)
165*67e74705SXin Li foo();
166*67e74705SXin Li #pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}}
167*67e74705SXin Li for (int i = 0; i < 10; ++i)
168*67e74705SXin Li foo();
169*67e74705SXin Li #pragma omp simd reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}}
170*67e74705SXin Li for (int i = 0; i < 10; ++i)
171*67e74705SXin Li foo();
172*67e74705SXin Li #pragma omp parallel shared(i)
173*67e74705SXin Li #pragma omp parallel reduction(min : i)
174*67e74705SXin Li #pragma omp simd reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
175*67e74705SXin Li for (int i = 0; i < 10; ++i)
176*67e74705SXin Li foo();
177*67e74705SXin Li #pragma omp parallel private(fl)
178*67e74705SXin Li #pragma omp simd reduction(+ : fl)
179*67e74705SXin Li for (int i = 0; i < 10; ++i)
180*67e74705SXin Li foo();
181*67e74705SXin Li #pragma omp parallel reduction(* : fl)
182*67e74705SXin Li #pragma omp simd reduction(+ : fl)
183*67e74705SXin Li for (int i = 0; i < 10; ++i)
184*67e74705SXin Li foo();
185*67e74705SXin Li
186*67e74705SXin Li return T();
187*67e74705SXin Li }
188*67e74705SXin Li
189*67e74705SXin Li namespace A {
190*67e74705SXin Li double x;
191*67e74705SXin Li #pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}}
192*67e74705SXin Li }
193*67e74705SXin Li namespace B {
194*67e74705SXin Li using A::x;
195*67e74705SXin Li }
196*67e74705SXin Li
main(int argc,char ** argv)197*67e74705SXin Li int main(int argc, char **argv) {
198*67e74705SXin Li const int d = 5; // expected-note 2 {{'d' defined here}}
199*67e74705SXin Li const int da[5] = {0}; // expected-note {{'da' defined here}}
200*67e74705SXin Li int qa[5] = {0};
201*67e74705SXin Li S4 e(4);
202*67e74705SXin Li S5 g(5);
203*67e74705SXin Li int i;
204*67e74705SXin Li int &j = i; // expected-note 2 {{'j' defined here}}
205*67e74705SXin Li S3 &p = k; // expected-note 2 {{'p' defined here}}
206*67e74705SXin Li const int &r = da[i]; // expected-note {{'r' defined here}}
207*67e74705SXin Li int &q = qa[i]; // expected-note {{'q' defined here}}
208*67e74705SXin Li float fl;
209*67e74705SXin Li #pragma omp simd reduction // expected-error {{expected '(' after 'reduction'}}
210*67e74705SXin Li for (int i = 0; i < 10; ++i)
211*67e74705SXin Li foo();
212*67e74705SXin Li #pragma omp simd reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
213*67e74705SXin Li for (int i = 0; i < 10; ++i)
214*67e74705SXin Li foo();
215*67e74705SXin Li #pragma omp simd reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
216*67e74705SXin Li for (int i = 0; i < 10; ++i)
217*67e74705SXin Li foo();
218*67e74705SXin Li #pragma omp simd reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
219*67e74705SXin Li for (int i = 0; i < 10; ++i)
220*67e74705SXin Li foo();
221*67e74705SXin Li #pragma omp simd reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
222*67e74705SXin Li for (int i = 0; i < 10; ++i)
223*67e74705SXin Li foo();
224*67e74705SXin Li #pragma omp simd reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
225*67e74705SXin Li for (int i = 0; i < 10; ++i)
226*67e74705SXin Li foo();
227*67e74705SXin Li #pragma omp simd reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
228*67e74705SXin Li for (int i = 0; i < 10; ++i)
229*67e74705SXin Li foo();
230*67e74705SXin Li #pragma omp simd reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
231*67e74705SXin Li for (int i = 0; i < 10; ++i)
232*67e74705SXin Li foo();
233*67e74705SXin Li #pragma omp simd reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
234*67e74705SXin Li for (int i = 0; i < 10; ++i)
235*67e74705SXin Li foo();
236*67e74705SXin Li #pragma omp simd reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name, array element or array section}}
237*67e74705SXin Li for (int i = 0; i < 10; ++i)
238*67e74705SXin Li foo();
239*67e74705SXin Li #pragma omp simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
240*67e74705SXin Li for (int i = 0; i < 10; ++i)
241*67e74705SXin Li foo();
242*67e74705SXin Li #pragma omp simd reduction(&& : argc)
243*67e74705SXin Li for (int i = 0; i < 10; ++i)
244*67e74705SXin Li foo();
245*67e74705SXin Li #pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
246*67e74705SXin Li for (int i = 0; i < 10; ++i)
247*67e74705SXin Li foo();
248*67e74705SXin Li #pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified list item cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}}
249*67e74705SXin Li for (int i = 0; i < 10; ++i)
250*67e74705SXin Li foo();
251*67e74705SXin Li #pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified list item cannot be reduction}}
252*67e74705SXin Li for (int i = 0; i < 10; ++i)
253*67e74705SXin Li foo();
254*67e74705SXin Li #pragma omp simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
255*67e74705SXin Li for (int i = 0; i < 10; ++i)
256*67e74705SXin Li foo();
257*67e74705SXin Li #pragma omp simd reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}}
258*67e74705SXin Li for (int i = 0; i < 10; ++i)
259*67e74705SXin Li foo();
260*67e74705SXin Li #pragma omp simd reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}}
261*67e74705SXin Li for (int i = 0; i < 10; ++i)
262*67e74705SXin Li foo();
263*67e74705SXin Li #pragma omp simd reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}}
264*67e74705SXin Li for (int i = 0; i < 10; ++i)
265*67e74705SXin Li foo();
266*67e74705SXin Li #pragma omp simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
267*67e74705SXin Li for (int i = 0; i < 10; ++i)
268*67e74705SXin Li foo();
269*67e74705SXin Li #pragma omp simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
270*67e74705SXin Li for (int i = 0; i < 10; ++i)
271*67e74705SXin Li foo();
272*67e74705SXin Li #pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}}
273*67e74705SXin Li for (int i = 0; i < 10; ++i)
274*67e74705SXin Li foo();
275*67e74705SXin Li #pragma omp simd reduction(& : e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{invalid operands to binary expression ('S4' and 'S4')}} expected-error {{calling a private constructor of class 'S5'}} expected-error {{invalid operands to binary expression ('S5' and 'S5')}}
276*67e74705SXin Li for (int i = 0; i < 10; ++i)
277*67e74705SXin Li foo();
278*67e74705SXin Li #pragma omp simd reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
279*67e74705SXin Li for (int i = 0; i < 10; ++i)
280*67e74705SXin Li foo();
281*67e74705SXin Li #pragma omp simd reduction(+ : o) // expected-error {{no viable overloaded '='}}
282*67e74705SXin Li for (int i = 0; i < 10; ++i)
283*67e74705SXin Li foo();
284*67e74705SXin Li #pragma omp simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
285*67e74705SXin Li for (int i = 0; i < 10; ++i)
286*67e74705SXin Li foo();
287*67e74705SXin Li #pragma omp parallel private(k)
288*67e74705SXin Li #pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
289*67e74705SXin Li for (int i = 0; i < 10; ++i)
290*67e74705SXin Li foo();
291*67e74705SXin Li #pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
292*67e74705SXin Li for (int i = 0; i < 10; ++i)
293*67e74705SXin Li foo();
294*67e74705SXin Li #pragma omp simd reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}}
295*67e74705SXin Li for (int i = 0; i < 10; ++i)
296*67e74705SXin Li foo();
297*67e74705SXin Li #pragma omp parallel shared(i)
298*67e74705SXin Li #pragma omp parallel reduction(min : i)
299*67e74705SXin Li #pragma omp simd reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
300*67e74705SXin Li for (int i = 0; i < 10; ++i)
301*67e74705SXin Li foo();
302*67e74705SXin Li #pragma omp parallel private(fl)
303*67e74705SXin Li #pragma omp simd reduction(+ : fl)
304*67e74705SXin Li for (int i = 0; i < 10; ++i)
305*67e74705SXin Li foo();
306*67e74705SXin Li #pragma omp parallel reduction(* : fl)
307*67e74705SXin Li #pragma omp simd reduction(+ : fl)
308*67e74705SXin Li for (int i = 0; i < 10; ++i)
309*67e74705SXin Li foo();
310*67e74705SXin Li
311*67e74705SXin Li return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
312*67e74705SXin Li }
313