ELF: Have __rela_iplt_{start,end} surround .rela.iplt with --pack-dyn-relocs=android.
[llvm-project.git] / openmp / runtime / test / tasking / hidden_helper_task / issue-87117.c
blob23080982f49e190d375895557b24b8eaf2166eb9
1 // RUN: %libomp-compile
2 // RUN: env KMP_HOT_TEAMS_MODE=0 KMP_HOT_TEAMS_MAX_LEVEL=1 %libomp-run
3 //
4 // Force the defaults of:
5 // KMP_HOT_TEAMS_MODE=0 means free extra threads after parallel
6 // involving non-hot team
7 // KMP_HOT_TEAMS_MAX_LEVEL=1 means only the initial outer team
8 // is a hot team.
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <omp.h>
14 int main() {
15 int a;
16 omp_set_max_active_levels(2);
17 // This nested parallel creates extra threads on the thread pool
18 #pragma omp parallel num_threads(2)
20 #pragma omp parallel num_threads(2)
22 #pragma omp atomic
23 a++;
27 // Causes assert if hidden helper thread tries to allocate from thread pool
28 // instead of creating new OS threads
29 #pragma omp parallel num_threads(1)
31 #pragma omp target nowait
32 { a++; }
35 return EXIT_SUCCESS;