1 // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=51 -ast-print %s | FileCheck %s
2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -fopenmp-version=51 -emit-pch -o %t %s
3 // RUN: %clang_cc1 -fopenmp -std=c++11 -fopenmp-version=51 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
5 // RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=51 -ast-print %s | FileCheck %s
6 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -fopenmp-version=51 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -fopenmp-simd -std=c++11 -fopenmp-version=51 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
8 // expected-no-diagnostics
14 // CHECK: template <typename T, int N> int tmain(T argc, char **argv)
15 // CHECK: static int a;
16 // CHECK-NEXT: #pragma omp error at(execution) severity(fatal) message("GNU compiler required.")
17 // CHECK-NEXT: a = argv[0][0];
19 // CHECK-NEXT: #pragma omp error at(execution) severity(warning) message("Notice: add for loop.")
21 // CHECK-NEXT: int b = 10;
22 // CHECK-NEXT: T c = 100;
23 // CHECK-NEXT: a = b + c;
25 // CHECK-NEXT: #pragma omp error at(execution) severity(fatal) message("GPU compiler required.")
27 // CHECK-NEXT: return N;
29 template <typename T
, int N
>
30 int tmain(T argc
, char **argv
) {
31 T b
= argc
, c
, d
, e
, f
, g
;
33 #pragma omp error at(execution) severity(fatal) message("GNU compiler required.")
36 #pragma omp error at(execution) severity(warning) message("Notice: add for loop.")
42 #pragma omp error at(execution) severity(fatal) message("GPU compiler required.")
47 // CHECK: int main(int argc, char **argv)
48 // CHECK-NEXT: int b = argc, c, d, e, f, g;
49 // CHECK-NEXT: static int a;
50 // CHECK-NEXT: #pragma omp error at(execution) severity(fatal) message("GPU compiler required.")
52 // CHECK-NEXT: #pragma omp error at(execution) severity(warning) message("Note this is functioncall.")
54 int main (int argc
, char **argv
) {
55 int b
= argc
, c
, d
, e
, f
, g
;
57 #pragma omp error at(execution) severity(fatal) message("GPU compiler required.")
59 #pragma omp error at(execution) severity(warning) message("Note this is functioncall.")