Mercurial > hg > CbC > CbC_gcc
comparison libgomp/testsuite/libgomp.fortran/lock-2.f90 @ 0:a06113de4d67
first commit
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2009 14:47:48 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a06113de4d67 |
---|---|
1 ! { dg-do run } | |
2 | |
3 use omp_lib | |
4 | |
5 integer (kind = omp_nest_lock_kind) :: lock | |
6 logical :: l | |
7 | |
8 l = .false. | |
9 call omp_init_nest_lock (lock) | |
10 !$omp parallel num_threads (1) reduction (.or.:l) | |
11 if (omp_test_nest_lock (lock) .ne. 1) call abort | |
12 if (omp_test_nest_lock (lock) .ne. 2) call abort | |
13 !$omp task if (.false.) shared (lock, l) | |
14 if (omp_test_nest_lock (lock) .ne. 0) l = .true. | |
15 !$omp end task | |
16 !$omp taskwait | |
17 if (omp_test_nest_lock (lock) .ne. 3) l = .true. | |
18 call omp_unset_nest_lock (lock) | |
19 call omp_unset_nest_lock (lock) | |
20 call omp_unset_nest_lock (lock) | |
21 !$omp end parallel | |
22 if (l) call abort | |
23 call omp_destroy_nest_lock (lock) | |
24 end |