1 // RUN: %libomp-compile-and-run
3 #include "omp_testsuite.h"
5 int test_omp_section_lastprivate()
18 #pragma omp sections lastprivate(i0) private(i,sum0)
23 for (i
= 1; i
< 400; i
++)
32 } /* end of section */
36 for(i
= 400; i
< 700; i
++)
49 for(i
= 700; i
< 1000; i
++)
58 } /* end of section */
59 } /* end of sections*/
60 } /* end of parallel*/
61 known_sum
= (999 * 1000) / 2;
62 return ((known_sum
== sum
) && (i0
== 999) );
70 for(i
= 0; i
< REPETITIONS
; i
++) {
71 if(!test_omp_section_lastprivate()) {