[flang-commits] [flang] [flang][OpenMP] Add `hostIsSource` paramemter to `copyHostAssociateVar` (PR #123162)
KAWASHIMA Takahiro via flang-commits
flang-commits at lists.llvm.org
Thu Jan 30 07:20:01 PST 2025
kawashima-fj wrote:
Hi @ergawy, after this commit, the following tests in the Fujitsu Compiler Test Suite [started to fail](https://linaro.atlassian.net/browse/LLVM-1522).
- https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0034.f90
- https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0035.f90
- https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0036.f90
- https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0037.f90
- https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0042.f90
- https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0047.f90
Modified [0539_0042.f90](https://github.com/fujitsu/compiler-test-suite/blob/main/Fortran/0539/0539_0042.f90):
```fortran
program main
implicit none
integer :: ido1 = 1
integer :: ido2 = 2
integer :: ido3 = 3
integer :: ido4 = 4
!$omp parallel default(none)
!$omp do collapse(2)
do ido1 = 1, 10
do ido2 = 1, 10
do ido3 = 1, 10
end do
end do
end do
!$omp end do
!$omp simd collapse(3)
do ido1 = 1, 10
do ido2 = 1, 10
do ido3 = 1, 10
end do
end do
end do
!$omp end simd
!$omp end parallel
print *, ido1
print *, ido2
print *, ido3
print *, ido4
end
```
This test expects to print `3` for `ido3`. Before this commit, `3` is printed. After this commit, `9` is printed regardless of the value of `OMP_NUM_THREADS`. x86-64 gfortran 14.2, x86-64 ifx 2024.0.0, x86-64 ifort 2021.11.0, and the proprietary Fujitsu Compiler (frt) 4.11.0 also print `3` for `ido3`. (gfortran fails to compile this code unless I remove `default(none)`. I don't know the reason.)
Could you take a look?
https://github.com/llvm/llvm-project/pull/123162
More information about the flang-commits
mailing list