brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 6a0cdd7 Raw
33 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fopenmp -fopenmp-version=51 -verify=expected,omp-52-and-earlier -ferror-limit 100 -o - %s -Wuninitialized2// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fopenmp -fopenmp-version=52 -verify=expected,omp-52-and-earlier -ferror-limit 100 -o - %s -Wuninitialized3// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fopenmp -fopenmp-version=60 -verify=expected,omp-60-and-later   -ferror-limit 100 -o - %s -Wuninitialized4 5// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fopenmp-simd -fopenmp-version=51 -verify=expected,omp-52-and-earlier  -ferror-limit 100 -o - %s -Wuninitialized6// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fopenmp-simd -fopenmp-version=52 -verify=expected,omp-52-and-earlier  -ferror-limit 100 -o - %s -Wuninitialized7// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fopenmp-simd -fopenmp-version=60 -verify=expected,omp-60-and-later    -ferror-limit 100 -o - %s -Wuninitialized8 9void foo() {10}11 12int main(int argc, char **argv) {13  int i, z;14  #pragma omp target parallel for nowait( // omp-52-and-earlier-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} omp-60-and-later-error {{expected expression}} omp-60-and-later-error {{expected ')'}} omp-60-and-later-note {{to match this '('}}15  for (i = 0; i < argc; ++i) foo();16  #pragma omp target parallel for nowait (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}17  for (i = 0; i < argc; ++i) foo();18  #pragma omp target parallel for nowait device (-10u)19  for (i = 0; i < argc; ++i) foo();20  #pragma omp target parallel for nowait (3.14) device (-10u) // omp-52-and-earlier-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}21  for (i = 0; i < argc; ++i) foo();22  #pragma omp target parallel for nowait (argc>> z) // omp-52-and-earlier-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}23  for (i = 0; i < argc; ++i) foo();24  #pragma omp target parallel for nowait (argv[1] = 2) // omp-52-and-earlier-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} omp-60-and-later-error {{expected ')'}} omp-60-and-later-note {{to match this '('}}25  for (i = 0; i < argc; ++i) foo();26  #pragma omp target parallel for nowait (argc > 0 ? argv[1] : argv[2]) // omp-52-and-earlier-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}27  for (i = 0; i < argc; ++i) foo();28  #pragma omp target parallel for nowait (S1) // omp-52-and-earlier-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} omp-60-and-later-error {{use of undeclared identifier 'S1'}}29  for (i = 0; i < argc; ++i) foo();30 31  return 0;32}33