Mercurial > hg > CbC > CbC_gcc
comparison libgomp/testsuite/libgomp.c/loop-10.c @ 0:a06113de4d67
first commit
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2009 14:47:48 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a06113de4d67 |
---|---|
1 extern void abort (void); | |
2 | |
3 int i = 8; | |
4 | |
5 int main (void) | |
6 { | |
7 int j = 7, k = 0; | |
8 #pragma omp for | |
9 for (i = 0; i < 10; i++) | |
10 ; | |
11 #pragma omp for | |
12 for (j = 0; j < 10; j++) | |
13 ; | |
14 /* OpenMP 3.0 newly guarantees that the original list items can't | |
15 be shared with the privatized omp for iterators, even when | |
16 the original list items are already private. */ | |
17 if (i != 8 || j != 7) | |
18 abort (); | |
19 #pragma omp parallel private (i) reduction (+:k) | |
20 { | |
21 i = 6; | |
22 #pragma omp for | |
23 for (i = 0; i < 10; i++) | |
24 ; | |
25 k = (i != 6); | |
26 } | |
27 if (k) | |
28 abort (); | |
29 return 0; | |
30 } |