1 // RUN: %libomp-compile-and-run
4 #include "omp_testsuite.h"
7 #pragma omp threadprivate(sum1)
9 int test_omp_for_firstprivate()
24 threadsnum
=omp_get_num_threads();
29 #pragma omp for firstprivate(sum0)
30 for (i
= 1; i
<= LOOPCOUNT
; i
++) {
38 } /* end of critical */
39 } /* end of parallel */
40 known_sum
= 12345* threadsnum
+ (LOOPCOUNT
* (LOOPCOUNT
+ 1)) / 2;
41 return (known_sum
== sum
);
49 for(i
= 0; i
< REPETITIONS
; i
++) {
50 if(!test_omp_for_firstprivate()) {