Bump version to 19.1.0-rc3
[llvm-project.git] / offload / test / offloading / generic_multiple_parallel_regions.c
blob33fe2ca127b6dc47d8c844d0bb0050322211139c
1 // RUN: %libomptarget-compile-run-and-check-generic
2 // RUN: %libomptarget-compileopt-run-and-check-generic
4 #include <omp.h>
5 #include <stdio.h>
7 __attribute__((optnone)) void optnone() {}
9 int main() {
10 int i = 0;
11 #pragma omp target teams num_teams(1) map(tofrom : i)
13 optnone();
14 #pragma omp parallel
15 if (omp_get_thread_num() == 0)
16 ++i;
17 #pragma omp parallel
18 if (omp_get_thread_num() == 0)
19 ++i;
20 #pragma omp parallel
21 if (omp_get_thread_num() == 0)
22 ++i;
23 #pragma omp parallel
24 if (omp_get_thread_num() == 0)
25 ++i;
27 // CHECK: 4
28 printf("%i\n", i);