[Mlir-commits] [mlir] [flang] [openmp] [Flang][OpenMP] Remove use of non reference values from MapInfoOp (PR #72444)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Nov 16 07:31:18 PST 2023
================
@@ -14,14 +14,14 @@ program main
integer :: i = 1
integer :: j = 11
- !$omp target map(tofrom:x, i, j)
- do while (i <= j)
+ !$omp target
+ do i = 1, j
x(i) = i;
i = i + 1
----------------
agozillon wrote:
I'm not sure if this will compile at the moment because of the `i = i +1`, I think it will complain about a redefine I might be incorrect though! And I am not sure the check value would be the same with the line either. I could be wrong however!
I'd suggest just changing it to something like the below and drop the external integers (the `i` will likely get implicitly captured without implicit none in any case):
!$omp target
do i = 1, 10
x(i) = i;
end do
!$omp end target
https://github.com/llvm/llvm-project/pull/72444
More information about the Mlir-commits
mailing list