1 // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized 2 // RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized 3 // RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized 4 5 // RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized 6 // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized 7 // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized 8 9 extern int omp_default_mem_alloc; 10 void xxx(int argc) { 11 int fp; // expected-note {{initialize the variable 'fp' to silence this warning}} 12 #pragma omp distribute simd reduction(+:fp) // expected-warning {{variable 'fp' is uninitialized when used here}} 13 for (int i = 0; i < 10; ++i) 14 ; 15 } 16 17 void foo() { 18 } 19 20 bool foobool(int argc) { 21 return argc; 22 } 23 24 void foobar(int &ref) { 25 #pragma omp target 26 #pragma omp teams 27 #pragma omp distribute simd reduction(+:ref) 28 for (int i = 0; i < 10; ++i) 29 foo(); 30 } 31 32 struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}} 33 extern S1 a; 34 class S2 { 35 mutable int a; 36 S2 &operator+(const S2 &arg) { return (*this); } // expected-note 3 {{implicitly declared private here}} 37 38 public: 39 S2() : a(0) {} 40 S2(S2 &s2) : a(s2.a) {} 41 static float S2s; // expected-note 2 {{static data member is predetermined as shared}} 42 static const float S2sc; // expected-note 2 {{'S2sc' declared here}} 43 }; 44 const float S2::S2sc = 0; 45 S2 b; // expected-note 3 {{'b' defined here}} 46 const S2 ba[5]; // expected-note 2 {{'ba' defined here}} 47 class S3 { 48 int a; 49 50 public: 51 int b; 52 S3() : a(0) {} 53 S3(const S3 &s3) : a(s3.a) {} 54 S3 operator+(const S3 &arg1) { return arg1; } 55 }; 56 int operator+(const S3 &arg1, const S3 &arg2) { return 5; } 57 S3 c; // expected-note 3 {{'c' defined here}} 58 const S3 ca[5]; // expected-note 2 {{'ca' defined here}} 59 extern const int f; // expected-note 4 {{'f' declared here}} 60 class S4 { 61 int a; 62 S4(); // expected-note {{implicitly declared private here}} 63 S4(const S4 &s4); 64 S4 &operator+(const S4 &arg) { return (*this); } 65 66 public: 67 S4(int v) : a(v) {} 68 }; 69 S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; } 70 class S5 { 71 int a; 72 S5() : a(0) {} // expected-note {{implicitly declared private here}} 73 S5(const S5 &s5) : a(s5.a) {} 74 S5 &operator+(const S5 &arg); 75 76 public: 77 S5(int v) : a(v) {} 78 }; 79 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}} 80 #if __cplusplus >= 201103L // C++11 or later 81 // expected-note@-2 3 {{candidate function (the implicit move assignment operator) not viable}} 82 #endif 83 int a; 84 85 public: 86 S6() : a(6) {} 87 operator int() { return 6; } 88 } o; 89 90 S3 h, k; 91 #pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}} 92 93 template <class T> // expected-note {{declared here}} 94 T tmain(T argc) { 95 const T d = T(); // expected-note 4 {{'d' defined here}} 96 const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} 97 T qa[5] = {T()}; 98 T i; 99 long z; 100 T &j = i; // expected-note 4 {{'j' defined here}} 101 S3 &p = k; // expected-note 2 {{'p' defined here}} 102 const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} 103 T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}} 104 T fl; 105 #pragma omp target 106 #pragma omp teams 107 #pragma omp distribute simd reduction // expected-error {{expected '(' after 'reduction'}} 108 for (int i = 0; i < 10; ++i) 109 foo(); 110 #pragma omp target 111 #pragma omp teams 112 #pragma omp distribute simd reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp distribute simd' are ignored}} 113 for (int i = 0; i < 10; ++i) 114 foo(); 115 #pragma omp target 116 #pragma omp teams 117 #pragma omp distribute simd reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}} 118 for (int i = 0; i < 10; ++i) 119 foo(); 120 #pragma omp target 121 #pragma omp teams 122 #pragma omp distribute simd reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} 123 for (int i = 0; i < 10; ++i) 124 foo(); 125 #pragma omp target 126 #pragma omp teams 127 #pragma omp distribute simd reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} 128 for (int i = 0; i < 10; ++i) 129 foo(); 130 #pragma omp target 131 #pragma omp teams 132 #pragma omp distribute simd reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} 133 for (int i = 0; i < 10; ++i) 134 foo(); 135 #pragma omp target 136 #pragma omp teams 137 #pragma omp distribute simd reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} 138 for (int i = 0; i < 10; ++i) 139 foo(); 140 #pragma omp target 141 #pragma omp teams 142 #pragma omp distribute simd reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} 143 for (int i = 0; i < 10; ++i) 144 foo(); 145 #pragma omp target 146 #pragma omp teams 147 #pragma omp distribute 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')}} 148 for (int i = 0; i < 10; ++i) 149 foo(); 150 #pragma omp target 151 #pragma omp teams 152 #pragma omp distribute simd reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}} 153 for (int i = 0; i < 10; ++i) 154 foo(); 155 #pragma omp target 156 #pragma omp teams 157 #pragma omp distribute 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'}} 158 for (int i = 0; i < 10; ++i) 159 foo(); 160 #pragma omp target 161 #pragma omp teams 162 #pragma omp distribute simd reduction(&& : argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}} 163 for (int i = 0; i < 10; ++i) 164 foo(); 165 #pragma omp target 166 #pragma omp teams 167 #pragma omp distribute simd reduction(^ : z, T) // expected-error {{'T' does not refer to a value}} 168 for (int i = 0; i < 10; ++i) 169 foo(); 170 #pragma omp target 171 #pragma omp teams 172 #pragma omp distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} expected-warning 2 {{Type 'S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning 2 {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} 173 for (int i = 0; i < 10; ++i) 174 foo(); 175 #pragma omp target 176 #pragma omp teams 177 #pragma omp distribute 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 variable cannot be reduction}} 178 for (int i = 0; i < 10; ++i) 179 foo(); 180 #pragma omp target 181 #pragma omp teams 182 #pragma omp distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} 183 for (int i = 0; i < 10; ++i) 184 foo(); 185 #pragma omp target 186 #pragma omp teams 187 #pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} 188 for (int i = 0; i < 10; ++i) 189 foo(); 190 #pragma omp target 191 #pragma omp teams 192 #pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} 193 for (int i = 0; i < 10; ++i) 194 foo(); 195 #pragma omp target 196 #pragma omp teams 197 #pragma omp distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} 198 for (int i = 0; i < 10; ++i) 199 foo(); 200 #pragma omp target 201 #pragma omp teams 202 #pragma omp distribute simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} 203 for (int i = 0; i < 10; ++i) 204 foo(); 205 #pragma omp target 206 #pragma omp teams 207 #pragma omp distribute simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} 208 for (int i = 0; i < 10; ++i) 209 foo(); 210 #pragma omp target 211 #pragma omp teams 212 #pragma omp distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} 213 for (int i = 0; i < 10; ++i) 214 foo(); 215 #pragma omp target 216 #pragma omp teams 217 #pragma omp distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} expected-warning 2 {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} 218 for (int i = 0; i < 10; ++i) 219 foo(); 220 #pragma omp target 221 #pragma omp teams 222 #pragma omp distribute simd reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} 223 for (int i = 0; i < 10; ++i) 224 foo(); 225 #pragma omp target 226 #pragma omp teams 227 #pragma omp distribute simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} 228 for (int i = 0; i < 10; ++i) 229 foo(); 230 #pragma omp parallel private(k) 231 #pragma omp target 232 #pragma omp teams 233 #pragma omp distribute simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} 234 for (int i = 0; i < 10; ++i) 235 foo(); 236 #pragma omp target 237 #pragma omp teams 238 #pragma omp distribute simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 2 {{previously referenced here}} 239 for (int i = 0; i < 10; ++i) 240 foo(); 241 #pragma omp target 242 #pragma omp teams 243 #pragma omp distribute simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}} 244 for (int i = 0; i < 10; ++i) 245 foo(); 246 #pragma omp parallel shared(i) 247 #pragma omp parallel reduction(min : i) 248 #pragma omp target 249 #pragma omp teams 250 #pragma omp distribute simd reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} 251 for (int i = 0; i < 10; ++i) 252 foo(); 253 #pragma omp parallel private(fl) 254 #pragma omp target 255 #pragma omp teams 256 #pragma omp distribute simd reduction(+ : fl) 257 for (int i = 0; i < 10; ++i) 258 foo(); 259 #pragma omp parallel reduction(* : fl) 260 #pragma omp target 261 #pragma omp teams 262 #pragma omp distribute simd reduction(+ : fl) 263 for (int i = 0; i < 10; ++i) 264 foo(); 265 266 return T(); 267 } 268 269 namespace A { 270 double x; 271 #pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}} 272 } 273 namespace B { 274 using A::x; 275 } 276 277 int main(int argc, char **argv) { 278 const int d = 5; // expected-note 2 {{'d' defined here}} 279 const int da[5] = {0}; // expected-note {{'da' defined here}} 280 int qa[5] = {0}; 281 S4 e(4); 282 S5 g(5); 283 int i, z; 284 int &j = i; // expected-note 2 {{'j' defined here}} 285 S3 &p = k; // expected-note 2 {{'p' defined here}} 286 const int &r = da[i]; // expected-note {{'r' defined here}} 287 int &q = qa[i]; // expected-note {{'q' defined here}} 288 float fl; 289 #pragma omp target 290 #pragma omp teams 291 #pragma omp distribute simd reduction // expected-error {{expected '(' after 'reduction'}} 292 for (int i = 0; i < 10; ++i) 293 foo(); 294 #pragma omp target 295 #pragma omp teams 296 #pragma omp distribute simd reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp distribute simd' are ignored}} 297 for (int i = 0; i < 10; ++i) 298 foo(); 299 #pragma omp target 300 #pragma omp teams 301 #pragma omp distribute simd reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}} 302 for (int i = 0; i < 10; ++i) 303 foo(); 304 #pragma omp target 305 #pragma omp teams 306 #pragma omp distribute simd reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} 307 for (int i = 0; i < 10; ++i) 308 foo(); 309 #pragma omp target 310 #pragma omp teams 311 #pragma omp distribute simd reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} 312 for (int i = 0; i < 10; ++i) 313 foo(); 314 #pragma omp target 315 #pragma omp teams 316 #pragma omp distribute simd reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} 317 for (int i = 0; i < 10; ++i) 318 foo(); 319 #pragma omp target 320 #pragma omp teams 321 #pragma omp distribute simd reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} 322 for (int i = 0; i < 10; ++i) 323 foo(); 324 #pragma omp target 325 #pragma omp teams 326 #pragma omp distribute simd reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}} 327 for (int i = 0; i < 10; ++i) 328 foo(); 329 #pragma omp target 330 #pragma omp teams 331 #pragma omp distribute simd reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} 332 for (int i = 0; i < 10; ++i) 333 foo(); 334 #pragma omp target 335 #pragma omp teams 336 #pragma omp distribute simd reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name, array element or array section}} 337 for (int i = 0; i < 10; ++i) 338 foo(); 339 #pragma omp target 340 #pragma omp teams 341 #pragma omp distribute simd reduction(~ : argc) // expected-error {{expected unqualified-id}} 342 for (int i = 0; i < 10; ++i) 343 foo(); 344 #pragma omp target 345 #pragma omp teams 346 #pragma omp distribute simd reduction(&& : z, argc) 347 for (int i = 0; i < 10; ++i) 348 foo(); 349 #pragma omp target 350 #pragma omp teams 351 #pragma omp distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} 352 for (int i = 0; i < 10; ++i) 353 foo(); 354 #pragma omp target 355 #pragma omp teams 356 #pragma omp distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} expected-warning {{Type 'S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} 357 for (int i = 0; i < 10; ++i) 358 foo(); 359 #pragma omp target 360 #pragma omp teams 361 #pragma omp distribute 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 variable cannot be reduction}} expected-warning {{Type 'S2' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} expected-error {{incomplete type 'S1' where a complete type is required}} 362 for (int i = 0; i < 10; ++i) 363 foo(); 364 #pragma omp target 365 #pragma omp teams 366 #pragma omp distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} 367 for (int i = 0; i < 10; ++i) 368 foo(); 369 #pragma omp target 370 #pragma omp teams 371 #pragma omp distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S2 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} 372 for (int i = 0; i < 10; ++i) 373 foo(); 374 #pragma omp target 375 #pragma omp teams 376 #pragma omp distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} expected-warning {{Type 'const S3 [5]' is not trivially copyable and not guaranteed to be mapped correctly}} 377 for (int i = 0; i < 10; ++i) 378 foo(); 379 #pragma omp target 380 #pragma omp teams 381 #pragma omp distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} 382 for (int i = 0; i < 10; ++i) 383 foo(); 384 #pragma omp target 385 #pragma omp teams 386 #pragma omp distribute simd reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} 387 for (int i = 0; i < 10; ++i) 388 foo(); 389 #pragma omp target 390 #pragma omp teams 391 #pragma omp distribute simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} 392 for (int i = 0; i < 10; ++i) 393 foo(); 394 #pragma omp target 395 #pragma omp teams 396 #pragma omp distribute simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}} 397 for (int i = 0; i < 10; ++i) 398 foo(); 399 #pragma omp target 400 #pragma omp teams 401 #pragma omp distribute 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')}} expected-warning {{Type 'S4' is not trivially copyable and not guaranteed to be mapped correctly}} expected-warning {{Type 'S5' is not trivially copyable and not guaranteed to be mapped correctly}}} 402 for (int i = 0; i < 10; ++i) 403 foo(); 404 #pragma omp target 405 #pragma omp teams 406 #pragma omp distribute simd reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}} expected-warning {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} 407 for (int i = 0; i < 10; ++i) 408 foo(); 409 #pragma omp target 410 #pragma omp teams 411 #pragma omp distribute simd reduction(+ : o) // expected-error {{no viable overloaded '='}} 412 for (int i = 0; i < 10; ++i) 413 foo(); 414 #pragma omp target 415 #pragma omp teams 416 #pragma omp distribute simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} 417 for (int i = 0; i < 10; ++i) 418 foo(); 419 #if __cplusplus < 201103L // < C++11 420 // expected-warning@+5 {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} 421 #endif 422 #pragma omp parallel private(k) 423 #pragma omp target 424 #pragma omp teams 425 #pragma omp distribute simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} 426 for (int i = 0; i < 10; ++i) 427 foo(); 428 #if __cplusplus < 201103L // < C++11 429 // expected-warning@+4 {{Type 'S3' is not trivially copyable and not guaranteed to be mapped correctly}} 430 #endif 431 #pragma omp target 432 #pragma omp teams 433 #pragma omp distribute simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}} 434 for (int i = 0; i < 10; ++i) 435 foo(); 436 #pragma omp target 437 #pragma omp teams 438 #pragma omp distribute simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}} 439 for (int i = 0; i < 10; ++i) 440 foo(); 441 #pragma omp parallel shared(i) 442 #pragma omp parallel reduction(min : i) 443 #pragma omp target 444 #pragma omp teams 445 #pragma omp distribute simd reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} 446 for (int i = 0; i < 10; ++i) 447 foo(); 448 #pragma omp parallel private(fl) 449 #pragma omp target 450 #pragma omp teams 451 #pragma omp distribute simd reduction(+ : fl) 452 for (int i = 0; i < 10; ++i) 453 foo(); 454 #pragma omp parallel reduction(* : fl) 455 #pragma omp target 456 #pragma omp teams 457 #pragma omp distribute simd reduction(+ : fl) 458 for (int i = 0; i < 10; ++i) 459 foo(); 460 static int m; 461 #pragma omp target 462 #pragma omp teams 463 #pragma omp distribute simd reduction(+ : m) // OK 464 for (int i = 0; i < 10; ++i) 465 m++; 466 467 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}} 468 } 469