1 // RUN: %libomp-compile
2 // RUN: env OMP_WAIT_POLICY=passive \
3 // RUN: KMP_FORKJOIN_BARRIER_PATTERN='linear,linear' %libomp-run
4 // RUN: env OMP_WAIT_POLICY=passive \
5 // RUN: KMP_FORKJOIN_BARRIER_PATTERN='tree,tree' %libomp-run
6 // RUN: env OMP_WAIT_POLICY=passive \
7 // RUN: KMP_FORKJOIN_BARRIER_PATTERN='hyper,hyper' %libomp-run
8 // RUN: env OMP_WAIT_POLICY=passive \
9 // RUN: KMP_FORKJOIN_BARRIER_PATTERN='dist,dist' %libomp-run
11 // LLVM ISSUE 80664: https://github.com/llvm/llvm-project/issues/80664
13 // Distributed barrier + OMP_WAIT_POLICY=passive hangs in library termination
14 // Reason: the resume logic in __kmp_free_team() was faulty and, when checking
15 // for sleep status, didn't look at correct location for distributed barrier.
22 void test_omp_barrier() {
35 printf("a = %d\n", a
);