• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1! RUN: %S/test_symbols.sh %s %t %f18 -fopenmp
2
3! 1.4.1 Structure of the OpenMP Memory Model
4! In the inner OpenMP region, SHARED `a` refers to the `a` in the outer OpenMP
5! region; PRIVATE `b` refers to the new `b` in the same OpenMP region
6
7  !DEF: /MainProgram1/b (Implicit) ObjectEntity REAL(4)
8  b = 2
9  !$omp parallel  private(a) shared(b)
10  !DEF: /MainProgram1/Block1/a (OmpPrivate) HostAssoc REAL(4)
11  a = 3.
12  !REF: /MainProgram1/b
13  b = 4
14  !$omp parallel  private(b) shared(a)
15  !REF: /MainProgram1/Block1/a
16  a = 5.
17  !DEF: /MainProgram1/Block1/Block1/b (OmpPrivate) HostAssoc REAL(4)
18  b = 6
19  !$omp end parallel
20  !$omp end parallel
21  !DEF: /MainProgram1/a (Implicit) ObjectEntity REAL(4)
22  !REF: /MainProgram1/b
23  print *, a, b
24end program
25