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
For variable size arrays, flang generates an artificial variable in the debug info that holds the length. I noticed that variable inside the target region are using the artificial variable in the host for the length which is not working. As a result, the evaluation fails. The problem could be reproduced with the following program.
subroutine fn(b, c)
integer c
integer b(c, 20)
b = 2
!$omp target map(tofrom:b)
b(1, 1) = 3
!$omp end target
end subroutine fn
program main
integer a(10, 20)
call fn(a, 10)
print *, a
end program
Run to line inside the target region and check the type of the b and you will see that it is not correct. I guess similar issue will exist with variable strings.