Version of flang-new : 19.0.0(1a498103ee5c4d101e70dc49db11938d8b87b518)/AArch64
The attached program (An assignment statement in task shared construct in taskgroup construct) has incorrect results.
When task shared construct is removed, the results are correct.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
taskgroup_003_22.f90:
program main
integer, dimension(10) :: a
a = 0
write(6,*) "1 : a = ", a
!$omp parallel private(i)
!$omp sections
!$omp section
!$omp taskgroup
do i=1,10
!$omp task shared(a)
!$omp atomic write
a(i) = 1
!$omp end task
end do
!$omp end taskgroup
write(6,*) "2 : a = ", a
!$omp end sections
!$omp end parallel
end program main
The attached program (An assignment statement in
task shared
construct intaskgroup
construct) has incorrect results.When
task shared
construct is removed, the results are correct.The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
taskgroup_003_22.f90: