1 | // RUN: %libomptarget-compile-run-and-check-generic |
2 | |
3 | // REQUIRES: libc |
4 | |
5 | #include <stdio.h> |
6 | |
7 | #pragma omp declare target to(stdout) |
8 | |
9 | int main() { |
10 | // CHECK: PASS |
11 | #pragma omp target |
12 | { fputs(s: "PASS\n" , stdout); } |
13 | |
14 | // CHECK: PASS |
15 | #pragma omp target nowait |
16 | { fputs(s: "PASS\n" , stdout); } |
17 | |
18 | // CHECK: PASS |
19 | #pragma omp target nowait |
20 | { fputs(s: "PASS\n" , stdout); } |
21 | |
22 | #pragma omp taskwait |
23 | |
24 | // CHECK: PASS |
25 | // CHECK: PASS |
26 | // CHECK: PASS |
27 | // CHECK: PASS |
28 | // CHECK: PASS |
29 | // CHECK: PASS |
30 | // CHECK: PASS |
31 | // CHECK: PASS |
32 | #pragma omp target teams num_teams(4) |
33 | #pragma omp parallel num_threads(2) |
34 | { puts(s: "PASS\n" ); } |
35 | } |
36 | |