Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / openmp / tools / archer / tests / task / task_early_fulfill.c
blob5b5f45e0b0797eb0f29f29ea966cd4ca595ff77d
1 // RUN: %libarcher-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' \
2 // RUN: %libarcher-run
3 //| FileCheck %s
5 // Checked gcc 10.1 still does not support detach clause on task construct.
6 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
7 // gcc 11 introduced detach clause, but gomp interface in libomp has no support
8 // XFAIL: gcc-11, gcc-12
9 // clang supports detach clause since version 11.
10 // UNSUPPORTED: clang-10, clang-9, clang-8, clang-7
11 // icc compiler does not support detach clause.
12 // UNSUPPORTED: icc
13 // REQUIRES: tsan
15 #include <omp.h>
16 #include <stdio.h>
18 int main() {
19 #pragma omp parallel
20 #pragma omp master
22 omp_event_handle_t event;
23 #pragma omp task detach(event) if (0)
24 { omp_fulfill_event(event); }
25 #pragma omp taskwait
27 return 0;