Files
clang-p2996/flang/test/Semantics/omp-symbol03.f90
Ivan Zhechev eabae4cf57 [Flang] Ported test_symbols to Python
Due to unavailability of Flang testing on Windows, the shell scripts
are being ported to Python. The following changes are being made in
this patch: removed test_symbols.sh and common.sh, and ported them
to Python. Changes to the tests themselves so that they use the
python scripts instead of the shell script.

Reviewed By: Meinersbur, awarzynski, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D107041
2021-08-09 16:20:06 +01:00

25 lines
765 B
Fortran

! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
! 1.4.1 Structure of the OpenMP Memory Model
! In the inner OpenMP region, SHARED `a` refers to the `a` in the outer OpenMP
! region; PRIVATE `b` refers to the new `b` in the same OpenMP region
!DEF: /MainProgram1/b (Implicit) ObjectEntity REAL(4)
b = 2
!$omp parallel private(a) shared(b)
!DEF: /MainProgram1/Block1/a (OmpPrivate) HostAssoc REAL(4)
a = 3.
!REF: /MainProgram1/b
b = 4
!$omp parallel private(b) shared(a)
!REF: /MainProgram1/Block1/a
a = 5.
!DEF: /MainProgram1/Block1/Block1/b (OmpPrivate) HostAssoc REAL(4)
b = 6
!$omp end parallel
!$omp end parallel
!DEF: /MainProgram1/a (Implicit) ObjectEntity REAL(4)
!REF: /MainProgram1/b
print *, a, b
end program