blob: 8e762bb3e425d0f2f1636e0dff7ef7bc24176da1 [file] [log] [blame]
Tim Keith99aa87a2020-05-11 18:38:531! RUN: %S/test_errors.sh %s %t %f18 -fopenmp
Jinxin Yangf3961572019-09-16 06:08:292
3! 2.15.3 Although variables in common blocks can be accessed by use association
4! or host association, common block names cannot. As a result, a common block
5! name specified in a data-sharing attribute clause must be declared to be a
6! common block in the same scoping unit in which the data-sharing attribute
7! clause appears.
8
9 common /c/ a, b
10 integer a(3), b
11
12 A = 1
13 B = 2
14 block
15 !ERROR: COMMON block must be declared in the same scoping unit in which the OpenMP directive or clause appears
16 !$omp parallel shared(/c/)
17 a(1:2) = 3
18 B = 4
19 !$omp end parallel
20 end block
21 print *, a, b
22end