xref: /aosp_15_r20/external/clang/test/OpenMP/teams_reduction_messages.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -verify -fopenmp -o - %s
2*67e74705SXin Li // RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s
3*67e74705SXin Li // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %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 target
85*67e74705SXin Li #pragma omp teams reduction // expected-error {{expected '(' after 'reduction'}}
86*67e74705SXin Li   foo();
87*67e74705SXin Li #pragma omp target
88*67e74705SXin Li #pragma omp teams reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
89*67e74705SXin Li   foo();
90*67e74705SXin Li #pragma omp target
91*67e74705SXin Li #pragma omp teams reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
92*67e74705SXin Li   foo();
93*67e74705SXin Li #pragma omp target
94*67e74705SXin Li #pragma omp teams reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
95*67e74705SXin Li   foo();
96*67e74705SXin Li #pragma omp target
97*67e74705SXin Li #pragma omp teams reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
98*67e74705SXin Li   foo();
99*67e74705SXin Li #pragma omp target
100*67e74705SXin Li #pragma omp teams reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
101*67e74705SXin Li   foo();
102*67e74705SXin Li #pragma omp target
103*67e74705SXin Li #pragma omp teams reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
104*67e74705SXin Li   foo();
105*67e74705SXin Li #pragma omp target
106*67e74705SXin Li #pragma omp teams reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
107*67e74705SXin Li   foo();
108*67e74705SXin Li #pragma omp target
109*67e74705SXin Li #pragma omp teams reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}}
110*67e74705SXin Li   foo();
111*67e74705SXin Li #pragma omp target
112*67e74705SXin Li #pragma omp teams reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}}
113*67e74705SXin Li   foo();
114*67e74705SXin Li #pragma omp target
115*67e74705SXin Li #pragma omp teams 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'}}
116*67e74705SXin Li   foo();
117*67e74705SXin Li #pragma omp target
118*67e74705SXin Li #pragma omp teams reduction(&& : argc)
119*67e74705SXin Li   foo();
120*67e74705SXin Li #pragma omp target
121*67e74705SXin Li #pragma omp teams reduction(^ : T) // expected-error {{'T' does not refer to a value}}
122*67e74705SXin Li   foo();
123*67e74705SXin Li #pragma omp target
124*67e74705SXin Li #pragma omp teams 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'}}
125*67e74705SXin Li   foo();
126*67e74705SXin Li #pragma omp target
127*67e74705SXin Li #pragma omp teams 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}}
128*67e74705SXin Li   foo();
129*67e74705SXin Li #pragma omp target
130*67e74705SXin Li #pragma omp teams reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
131*67e74705SXin Li   foo();
132*67e74705SXin Li #pragma omp target
133*67e74705SXin Li #pragma omp teams reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}}
134*67e74705SXin Li   foo();
135*67e74705SXin Li #pragma omp target
136*67e74705SXin Li #pragma omp teams reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}}
137*67e74705SXin Li   foo();
138*67e74705SXin Li #pragma omp target
139*67e74705SXin Li #pragma omp teams reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}} expected-error {{const-qualified list item cannot be reduction}}
140*67e74705SXin Li   foo();
141*67e74705SXin Li #pragma omp target
142*67e74705SXin Li #pragma omp teams reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
143*67e74705SXin Li   foo();
144*67e74705SXin Li #pragma omp target
145*67e74705SXin Li #pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
146*67e74705SXin Li   foo();
147*67e74705SXin Li #pragma omp target
148*67e74705SXin Li #pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}}
149*67e74705SXin Li   foo();
150*67e74705SXin Li #pragma omp target
151*67e74705SXin Li #pragma omp teams reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
152*67e74705SXin Li   foo();
153*67e74705SXin Li #pragma omp target
154*67e74705SXin Li #pragma omp teams reduction(+ : o) // expected-error 2 {{no viable overloaded '='}}
155*67e74705SXin Li   foo();
156*67e74705SXin Li #pragma omp target
157*67e74705SXin Li #pragma omp teams private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
158*67e74705SXin Li   foo();
159*67e74705SXin Li #pragma omp parallel private(k)
160*67e74705SXin Li #pragma omp target
161*67e74705SXin Li #pragma omp teams reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
162*67e74705SXin Li   foo();
163*67e74705SXin Li #pragma omp target
164*67e74705SXin Li #pragma omp teams reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}}
165*67e74705SXin Li   foo();
166*67e74705SXin Li #pragma omp target
167*67e74705SXin Li #pragma omp teams reduction(+ : r) // expected-error 2 {{const-qualified list item cannot be reduction}}
168*67e74705SXin Li   foo();
169*67e74705SXin Li #pragma omp parallel shared(i)
170*67e74705SXin Li #pragma omp parallel reduction(min : i)
171*67e74705SXin Li #pragma omp target
172*67e74705SXin Li #pragma omp teams reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
173*67e74705SXin Li   foo();
174*67e74705SXin Li #pragma omp target
175*67e74705SXin Li #pragma omp teams
176*67e74705SXin Li #pragma omp parallel for private(fl)
177*67e74705SXin Li   for (int i = 0; i < 10; ++i)
178*67e74705SXin Li   {}
179*67e74705SXin Li #pragma omp target
180*67e74705SXin Li #pragma omp teams reduction(+ : fl)
181*67e74705SXin Li     foo();
182*67e74705SXin Li #pragma omp target
183*67e74705SXin Li #pragma omp teams
184*67e74705SXin Li #pragma omp parallel for reduction(- : fl)
185*67e74705SXin Li   for (int i = 0; i < 10; ++i)
186*67e74705SXin Li   {}
187*67e74705SXin Li #pragma omp target
188*67e74705SXin Li #pragma omp teams reduction(+ : fl)
189*67e74705SXin Li     foo();
190*67e74705SXin Li 
191*67e74705SXin Li   return T();
192*67e74705SXin Li }
193*67e74705SXin Li 
194*67e74705SXin Li namespace A {
195*67e74705SXin Li double x;
196*67e74705SXin Li #pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}}
197*67e74705SXin Li }
198*67e74705SXin Li namespace B {
199*67e74705SXin Li using A::x;
200*67e74705SXin Li }
201*67e74705SXin Li 
main(int argc,char ** argv)202*67e74705SXin Li int main(int argc, char **argv) {
203*67e74705SXin Li   const int d = 5;       // expected-note 2 {{'d' defined here}}
204*67e74705SXin Li   const int da[5] = {0}; // expected-note {{'da' defined here}}
205*67e74705SXin Li   int qa[5] = {0};
206*67e74705SXin Li   S4 e(4);
207*67e74705SXin Li   S5 g(5);
208*67e74705SXin Li   int i;
209*67e74705SXin Li   int &j = i;                  // expected-note 2 {{'j' defined here}}
210*67e74705SXin Li   S3 &p = k;                   // expected-note 2 {{'p' defined here}}
211*67e74705SXin Li   const int &r = da[i];        // expected-note {{'r' defined here}}
212*67e74705SXin Li   int &q = qa[i];              // expected-note {{'q' defined here}}
213*67e74705SXin Li   float fl;
214*67e74705SXin Li #pragma omp target
215*67e74705SXin Li #pragma omp teams reduction // expected-error {{expected '(' after 'reduction'}}
216*67e74705SXin Li   foo();
217*67e74705SXin Li #pragma omp target
218*67e74705SXin Li #pragma omp teams reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp teams' are ignored}}
219*67e74705SXin Li   foo();
220*67e74705SXin Li #pragma omp target
221*67e74705SXin Li #pragma omp teams reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
222*67e74705SXin Li   foo();
223*67e74705SXin Li #pragma omp target
224*67e74705SXin Li #pragma omp teams reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
225*67e74705SXin Li   foo();
226*67e74705SXin Li #pragma omp target
227*67e74705SXin Li #pragma omp teams reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
228*67e74705SXin Li   foo();
229*67e74705SXin Li #pragma omp target
230*67e74705SXin Li #pragma omp teams reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
231*67e74705SXin Li   foo();
232*67e74705SXin Li #pragma omp target
233*67e74705SXin Li #pragma omp teams reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
234*67e74705SXin Li   foo();
235*67e74705SXin Li #pragma omp target
236*67e74705SXin Li #pragma omp teams reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
237*67e74705SXin Li   foo();
238*67e74705SXin Li #pragma omp target
239*67e74705SXin Li #pragma omp teams reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
240*67e74705SXin Li   foo();
241*67e74705SXin Li #pragma omp target
242*67e74705SXin Li #pragma omp teams reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name, array element or array section}}
243*67e74705SXin Li   foo();
244*67e74705SXin Li #pragma omp target
245*67e74705SXin Li #pragma omp teams reduction(~ : argc) // expected-error {{expected unqualified-id}}
246*67e74705SXin Li   foo();
247*67e74705SXin Li #pragma omp target
248*67e74705SXin Li #pragma omp teams reduction(&& : argc)
249*67e74705SXin Li   foo();
250*67e74705SXin Li #pragma omp target
251*67e74705SXin Li #pragma omp teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
252*67e74705SXin Li   foo();
253*67e74705SXin Li #pragma omp target
254*67e74705SXin Li #pragma omp teams 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'}}
255*67e74705SXin Li   foo();
256*67e74705SXin Li #pragma omp target
257*67e74705SXin Li #pragma omp teams 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}}
258*67e74705SXin Li   foo();
259*67e74705SXin Li #pragma omp target
260*67e74705SXin Li #pragma omp teams reduction(max : h.b) // expected-error {{expected variable name, array element or array section}}
261*67e74705SXin Li   foo();
262*67e74705SXin Li #pragma omp target
263*67e74705SXin Li #pragma omp teams reduction(+ : ba) // expected-error {{const-qualified list item cannot be reduction}}
264*67e74705SXin Li   foo();
265*67e74705SXin Li #pragma omp target
266*67e74705SXin Li #pragma omp teams reduction(* : ca) // expected-error {{const-qualified list item cannot be reduction}}
267*67e74705SXin Li   foo();
268*67e74705SXin Li #pragma omp target
269*67e74705SXin Li #pragma omp teams reduction(- : da) // expected-error {{const-qualified list item cannot be reduction}}
270*67e74705SXin Li   foo();
271*67e74705SXin Li #pragma omp target
272*67e74705SXin Li #pragma omp teams reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}}
273*67e74705SXin Li   foo();
274*67e74705SXin Li #pragma omp target
275*67e74705SXin Li #pragma omp teams reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
276*67e74705SXin Li   foo();
277*67e74705SXin Li #pragma omp target
278*67e74705SXin Li #pragma omp teams reduction(&& : S2::S2sc) // expected-error {{const-qualified list item cannot be reduction}}
279*67e74705SXin Li   foo();
280*67e74705SXin Li #pragma omp target
281*67e74705SXin Li #pragma omp teams 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')}}
282*67e74705SXin Li   foo();
283*67e74705SXin Li #pragma omp target
284*67e74705SXin Li #pragma omp teams reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}}
285*67e74705SXin Li   foo();
286*67e74705SXin Li #pragma omp target
287*67e74705SXin Li #pragma omp teams reduction(+ : o) // expected-error {{no viable overloaded '='}}
288*67e74705SXin Li   foo();
289*67e74705SXin Li #pragma omp target
290*67e74705SXin Li #pragma omp teams private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
291*67e74705SXin Li   foo();
292*67e74705SXin Li #pragma omp parallel private(k)
293*67e74705SXin Li #pragma omp target
294*67e74705SXin Li #pragma omp teams reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
295*67e74705SXin Li   foo();
296*67e74705SXin Li #pragma omp target
297*67e74705SXin Li #pragma omp teams reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
298*67e74705SXin Li   foo();
299*67e74705SXin Li #pragma omp target
300*67e74705SXin Li #pragma omp teams reduction(+ : r) // expected-error {{const-qualified list item cannot be reduction}}
301*67e74705SXin Li   foo();
302*67e74705SXin Li #pragma omp parallel shared(i)
303*67e74705SXin Li #pragma omp parallel reduction(min : i)
304*67e74705SXin Li #pragma omp target
305*67e74705SXin Li #pragma omp teams reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
306*67e74705SXin Li   foo();
307*67e74705SXin Li #pragma omp target
308*67e74705SXin Li #pragma omp teams
309*67e74705SXin Li #pragma omp parallel for private(fl)
310*67e74705SXin Li   for (int i = 0; i < 10; ++i)
311*67e74705SXin Li   {}
312*67e74705SXin Li #pragma omp target
313*67e74705SXin Li #pragma omp teams reduction(+ : fl)
314*67e74705SXin Li     foo();
315*67e74705SXin Li #pragma omp target
316*67e74705SXin Li #pragma omp teams
317*67e74705SXin Li #pragma omp parallel for reduction(- : fl)
318*67e74705SXin Li   for (int i = 0; i < 10; ++i)
319*67e74705SXin Li   {}
320*67e74705SXin Li #pragma omp target
321*67e74705SXin Li #pragma omp teams reduction(+ : fl)
322*67e74705SXin Li     foo();
323*67e74705SXin Li   static int m;
324*67e74705SXin Li #pragma omp target
325*67e74705SXin Li #pragma omp teams reduction(+ : m) // OK
326*67e74705SXin Li   foo();
327*67e74705SXin Li 
328*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}}
329*67e74705SXin Li }
330