4 extern void abort (void);
10 /* x, p, and *q are flushed */
11 /* because they are shared and accessible */
12 /* q is not flushed because it is not shared. */
21 /* a barrier implies a flush */
22 /* x, p, and *q are flushed */
23 /* because they are shared and accessible */
24 /* q is not flushed because it is not shared. */
30 int i
= 1, j
, sum
= 0;
32 #pragma omp parallel reduction(+: sum) num_threads(2)
35 /* i, n and sum were not flushed */
36 /* because they were not accessible in f1 */
37 /* j was flushed because it was accessible */
40 /* i, n, and sum were not flushed */
41 /* because they were not accessible in f2 */
42 /* j was flushed because it was accessible */
43 sum
+= i
+ j
+ *p
+ n
;