1 // RUN: %libomp-compile-and-run
3 #include "omp_testsuite.h"
4 #include "omp_my_sleep.h"
18 rank
= omp_get_thread_num ();
22 #pragma omp flush (result2)
27 #pragma omp flush (result2)
30 } /* end of parallel */
31 return ((result1
== result2
) && (result2
== dummy
) && (result2
== 3));
39 // the test requires more than 1 thread to pass
40 omp_set_dynamic(0); // disable dynamic adjustment of threads
41 if (omp_get_max_threads() == 1)
42 omp_set_num_threads(2); // set 2 threads if no HW resources available
44 for (i
= 0; i
< REPETITIONS
; i
++) {
45 if(!test_omp_flush()) {