You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of flang-new : 20.0.0(5621929f7f4878c318deecb592cd03f5ecbb83ba)/AArch64
When multiple associate and parallel private constructs are nested, the value of association is incorrect.
The above program is FT_openmp_private_09_21.f90
When associate construct is not nested, the result is correct.
The above program is FT_openmp_private_09_22.f90
The following are the test program, Flang-new, Gfortran and ifx compilation/execution result.
FT_openmp_private_09_21.f90:
program main
integer:: b(3)=5integer:: d=10real:: f=15
associate(c=>d, a=>b(2:3))
!$omp parallel private(b,d,f)
associate(e=>f)
!$omp parallel private(f)
b=7
d=8
f=9if(e .ne.15) print*,"104",e
!$omp end parallel
end associate
if(a(1) .ne.5) print*,"101"if(a(2) .ne.5) print*,"102"if(c .ne.10) print*,"103",c
!$omp end parallel
print*, "pass"
end associate
end program main
$ export OMP_NUM_THREADS=2; flang-new -fopenmp FT_openmp_private_09_21.f90; ./a.out
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
104 1.54E-43
104 6.3116734E-19
pass
$
program main
integer:: b(3)=5integer:: d=10real:: f=15
associate(c=>d, a=>b(2:3),e=>f)
!$omp parallel private(b,d,f)
! associate(e=>f)
!$omp parallel private(f)
b=7
d=8
f=9if(e .ne.15) print*,"104",e
!$omp end parallel
! end associate
if(a(1) .ne.5) print*,"101"if(a(2) .ne.5) print*,"102"if(c .ne.10) print*,"103",c
!$omp end parallel
print*, "pass"
end associate
end program main
$ export OMP_NUM_THREADS=2; flang-new -fopenmp FT_openmp_private_09_22.f90; ./a.out
flang-20: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
pass
$
When multiple
associate
andparallel private
constructs are nested, the value ofassociation
is incorrect.The above program is
FT_openmp_private_09_21.f90
When
associate
construct is not nested, the result is correct.The above program is
FT_openmp_private_09_22.f90
The following are the test program, Flang-new, Gfortran and ifx compilation/execution result.
FT_openmp_private_09_21.f90:
FT_openmp_private_09_22.f90:
The text was updated successfully, but these errors were encountered: