1! RUN: %S/test_errors.sh %s %t %f18 -fopenmp
2
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
23