1 // RUN: %libomp-compile-and-run
3 #include "omp_testsuite.h"
5 int test_omp_parallel_shared()
12 known_sum
= (LOOPCOUNT
* (LOOPCOUNT
+ 1)) / 2 ;
14 #pragma omp parallel private(i) shared(sum)
19 for (i
= 1; i
<= LOOPCOUNT
; i
++) {
29 if (known_sum
!= sum
) {
30 fprintf(stderr
, "KNOWN_SUM = %d; SUM = %d\n", known_sum
, sum
);
32 return (known_sum
== sum
);
40 for(i
= 0; i
< REPETITIONS
; i
++) {
41 if(!test_omp_parallel_shared()) {