1 // RUN: %libomp-compile-and-run
2 // RUN: env OMP_NUM_THREADS=1 %libomp-run
3 // RUN: %libomp-compile -DUSE_HIDDEN_HELPERS=1
5 // RUN: env OMP_NUM_THREADS=1 %libomp-run
8 int main(int argc
, char *argv
[]) {
11 omp_set_max_active_levels(1);
14 for (i
= 0; i
< 10; ++i
) {
17 #ifndef USE_HIDDEN_HELPERS
18 omp_event_handle_t event
;
22 #ifdef USE_HIDDEN_HELPERS
23 #pragma omp target map(tofrom : a) nowait
25 #pragma omp task shared(a) detach(event)
32 #ifndef USE_HIDDEN_HELPERS
33 omp_fulfill_event(event
);