Mercurial > hg > CbC > CbC_gcc
annotate libgomp/testsuite/libgomp.fortran/appendix-a/a.28.5.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 compile } |
145 | 2 ! { dg-options "-w -std=legacy" } |
67
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 ! |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 ! "-w" added as libgomp/testsuite seemingly cannot parse with |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
5 ! dg-warning Fortran's output. Fortran warns for "call sub1(a)" |
f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
6 ! that there is a "Rank mismatch in argument 'x'". |
0 | 7 |
8 SUBROUTINE SUB1(X) | |
9 DIMENSION X(10) | |
10 ! This use of X does not conform to the | |
11 ! specification. It would be legal Fortran 90, | |
12 ! but the OpenMP private directive allows the | |
13 ! compiler to break the sequence association that | |
14 ! A had with the rest of the common block. | |
15 FORALL (I = 1:10) X(I) = I | |
16 END SUBROUTINE SUB1 | |
17 PROGRAM A28_5 | |
18 COMMON /BLOCK5/ A | |
19 DIMENSION B(10) | |
20 EQUIVALENCE (A,B(1)) | |
21 ! the common block has to be at least 10 words | |
22 A=0 | |
23 !$OMP PARALLEL PRIVATE(/BLOCK5/) | |
24 ! Without the private clause, | |
25 ! we would be passing a member of a sequence | |
26 ! that is at least ten elements long. | |
27 ! With the private clause, A may no longer be | |
28 ! sequence-associated. | |
29 CALL SUB1(A) | |
30 !$OMP MASTER | |
31 PRINT *, A | |
32 !$OMP END MASTER | |
33 !$OMP END PARALLEL | |
34 END PROGRAM A28_5 |