1 // RUN: %libomp-compile && env LIBOMP_NUM_HIDDEN_HELPER_THREADS=1 %libomp-run
3 // gcc/icc target offloading is incompatible with libomp
4 // UNSUPPORTED: icc, gcc
6 // The test checks that "devide-by-0" bug fixed in runtime.
7 // The fix is to increment number of threads by 1 if positive,
9 // (gtid) % (__kmp_hidden_helper_threads_num - 1)
10 // does not cause crash.
16 #pragma omp target nowait
18 printf("----- in target region\n");
20 printf("------ before taskwait\n");