1 // RUN: %libomp-compile-and-run
4 #include "omp_testsuite.h"
6 //static int sum1 = 789;
8 int test_omp_parallel_firstprivate()
10 int sum
, num_threads
,sum1
;
17 #pragma omp parallel firstprivate(sum1)
19 /*printf("sum1=%d\n",sum1);*/
22 for (i
= 1; i
< 1000; i
++) {
30 } /* end of parallel*/
31 known_sum
= (999 * 1000) / 2 + 7 * num_threads
;
32 return (known_sum
== sum
);
40 for(i
= 0; i
< REPETITIONS
; i
++) {
41 if(!test_omp_parallel_firstprivate()) {