1 2 3 4 5 6 7 8 9 10 11 12
int foo (void) { int i, a; a = 30; #pragma omp parallel for lastprivate (a) for (i = 0; i < 10; i++) a = a + i; return a; }