1 // RUN: %libomp-compile-and-run
2 #include "omp_testsuite.h"
7 #pragma omp threadprivate(i)
9 int test_omp_threadprivate_for()
14 known_sum
= (LOOPCOUNT
* (LOOPCOUNT
+ 1)) / 2;
21 for (i0
= 1; i0
<= LOOPCOUNT
; i0
++) {
29 } /* end of parallel */
31 if (known_sum
!= sum
) {
32 fprintf(stderr
, " known_sum = %d, sum = %d\n", known_sum
, sum
);
34 return (known_sum
== sum
);
35 } /* end of check_threadprivate*/
42 for(i
= 0; i
< REPETITIONS
; i
++) {
43 if(!test_omp_threadprivate_for()) {