1 // RUN: %libomp-compile && env OMP_NUM_THREADS='3' %libomp-run
2 // RUN: %libomp-compile && env OMP_NUM_THREADS='1' %libomp-run
4 // Checked gcc 10.1 still does not support detach clause on task construct.
5 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
6 // gcc 11 introduced detach clause, but gomp interface in libomp has no support
7 // XFAIL: gcc-11, gcc-12
8 // clang supports detach clause since version 11.
9 // UNSUPPORTED: clang-10, clang-9, clang-8, clang-7
10 // icc compiler does not support detach clause.
20 omp_event_handle_t event
;
21 #pragma omp task detach(event)
23 omp_fulfill_event(event
);