Issue |
134991
|
Summary |
[flang][OpenMP][debug] Invalid debug info for variable size string in target region.
|
Labels |
flang
|
Assignees |
abidh
|
Reporter |
abidh
|
For variable size strings, flang generates an artificial variable in the debug info that holds the length. While reviewing https://github.com/llvm/llvm-project/pull/134967, 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 but it will need the changes in #134967 to compile.
```
module test
implicit none
contains
subroutine TestOfCharacter(a0, a1, l)
character(len=*), intent(in) :: a0
character(len=*), intent(inout):: a1
integer, intent(in) :: l
!$omp target map(to:a0) map(from: a1)
a1 = a0
!$omp end target
end subroutine TestOfCharacter
end module test
program main
use test
character(len=15) :: first
character(len=:), allocatable :: second
first = 'Short string'
second='This is a large string.'
call TestOfCharacter(first, second, 23)
print *, first
print *, second
end program
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs