xref: /llvm-project/flang/test/Semantics/OpenMP/doconcurrent01.f90 (revision 9c464e60d2c74094e3782d363e482c98762036ee)
1471ca949Sharishch4! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
2471ca949Sharishch4
3*9c464e60SLeandro Lupori! OpenMP 5.2 5.1.1 Variables Referenced in a Construct
4*9c464e60SLeandro Lupori! DO CONCURRENT indices have predetermined private DSA.
5*9c464e60SLeandro Lupori!
6*9c464e60SLeandro Lupori! As DO CONCURRENT indices are defined in the construct itself, and OpenMP
7*9c464e60SLeandro Lupori! directives may not appear in it, they are already private.
8*9c464e60SLeandro Lupori! Check that index symbols are not modified.
9471ca949Sharishch4
10471ca949Sharishch4!DEF: /private_iv (Subroutine)Subprogram
11471ca949Sharishch4subroutine private_iv
12471ca949Sharishch4   !DEF: /private_iv/i ObjectEntity INTEGER(4)
13471ca949Sharishch4   integer i
14471ca949Sharishch4   !$omp parallel default(private)
15471ca949Sharishch4   !$omp single
16*9c464e60SLeandro Lupori   !DEF: /private_iv/OtherConstruct1/OtherConstruct1/Forall1/i ObjectEntity INTEGER(4)
17471ca949Sharishch4   do concurrent(i=1:2)
18471ca949Sharishch4   end do
19471ca949Sharishch4   !$omp end single
20471ca949Sharishch4   !$omp end parallel
21471ca949Sharishch4end subroutine
22