| 1 |
! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp |
| 2 |
|
| 3 |
! 2.15.3 Data-Sharing Attribute Clauses |
| 4 |
! Both PARALLEL and DO (worksharing) directives need to create new scope, |
| 5 |
! so PRIVATE `a` will have new symbol in each region |
| 6 |
|
| 7 |
!DEF: /MainProgram1/a ObjectEntity REAL(8) |
| 8 |
real*8 a |
| 9 |
!REF: /MainProgram1/a |
| 10 |
a = 3.14 |
| 11 |
!$omp parallel private(a) |
| 12 |
!DEF: /MainProgram1/OtherConstruct1/a (OmpPrivate) HostAssoc REAL(8) |
| 13 |
a = 2. |
| 14 |
!$omp do private(a) |
| 15 |
!DEF: /MainProgram1/OtherConstruct1/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4) |
| 16 |
do i=1,10 |
| 17 |
!DEF: /MainProgram1/OtherConstruct1/OtherConstruct1/a (OmpPrivate) HostAssoc REAL(8) |
| 18 |
a = 1. |
| 19 |
end do |
| 20 |
!$omp end parallel |
| 21 |
!REF: /MainProgram1/a |
| 22 |
print *, a |
| 23 |
end program |