Issue |
91927
|
Summary |
[Flang][OpenMP] Incorrect execution result of an assignment statement in task construct in taskgroup construct
|
Labels |
openmp,
flang
|
Assignees |
|
Reporter |
ohno-fj
|
```
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:
```fortran
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
```
```
$ flang-new -fopenmp taskgroup_003_22.f90; ./a.out
1 : a = 0 0 0 0 0 0 0 0 0 0
2 : a = 0 0 0 0 0 0 0 0 0 0
$
```
```
$ gfortran -fopenmp taskgroup_003_22.f90; ./a.out
1 : a = 0 0 0 0 0 0 0 0 0 0
2 : a = 1 1 1 1 1 1 1 1 1 1
$
```
```
$ ifort -qopenmp -diag-disable=10448 taskgroup_003_22.f90; ./a.out
1 : a = 0 0 0 0 0
0 0 0 0 0
2 : a = 1 1 1 1 1
1 1 1 1 1
$
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs