Mercurial > hg > CbC > CbC_gcc
annotate libgomp/testsuite/libgomp.fortran/crayptr2.f90 @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
children |
rev | line source |
---|---|
0 | 1 ! { dg-do run } |
111 | 2 ! { dg-options "-fcray-pointer" } |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 ! { dg-require-effective-target tls_runtime } |
0 | 4 |
5 use omp_lib | |
6 integer :: a, b, c, d, p | |
7 logical :: l | |
8 pointer (ip, p) | |
9 save ip | |
10 !$omp threadprivate (ip) | |
11 a = 1 | |
12 b = 2 | |
13 c = 3 | |
14 l = .false. | |
111 | 15 !$omp parallel num_threads (3) reduction (.or.:l) private (d) |
0 | 16 if (omp_get_thread_num () .eq. 0) then |
17 ip = loc (a) | |
18 elseif (omp_get_thread_num () .eq. 1) then | |
19 ip = loc (b) | |
20 else | |
21 ip = loc (c) | |
22 end if | |
23 l = p .ne. omp_get_thread_num () + 1 | |
24 !$omp single | |
25 d = omp_get_thread_num () | |
26 !$omp end single copyprivate (d, ip) | |
27 l = l .or. (p .ne. d + 1) | |
28 !$omp end parallel | |
29 | |
145 | 30 if (l) stop 1 |
0 | 31 end |