1 // RUN: %libomp-compile-and-run
4 #include "omp_testsuite.h"
6 /* Utility function do spend some time in a loop */
7 int test_omp_task_imp_firstprivate()
13 #pragma omp parallel firstprivate(i)
17 for (k
= 0; k
< NUM_TASKS
; k
++) {
18 #pragma omp task shared(result , task_result)
21 //check if i is private
24 for(j
= 0; j
< NUM_TASKS
; j
++)
26 //this should be firstprivate implicitly
30 result
= (task_result
&& i
==5);
41 for(i
= 0; i
< REPETITIONS
; i
++) {
42 if(!test_omp_task_imp_firstprivate()) {