diff options
Diffstat (limited to 'openmp/runtime/test/parallel/omp_parallel_shared.c')
-rw-r--r-- | openmp/runtime/test/parallel/omp_parallel_shared.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openmp/runtime/test/parallel/omp_parallel_shared.c b/openmp/runtime/test/parallel/omp_parallel_shared.c index a6a37060bbe..3146ca68efe 100644 --- a/openmp/runtime/test/parallel/omp_parallel_shared.c +++ b/openmp/runtime/test/parallel/omp_parallel_shared.c @@ -11,14 +11,14 @@ int test_omp_parallel_shared() sum = 0; known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2 ; - #pragma omp parallel private(i) shared(sum) + #pragma omp parallel private(i) shared(sum) { int mysum = 0; #pragma omp for for (i = 1; i <= LOOPCOUNT; i++) { mysum = mysum + i; - } + } #pragma omp critical { sum = sum + mysum; |