<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/113895>113895</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][debug] Wrong value for assumed shape character array.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
flang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
abidh
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
abidh
</td>
</tr>
</table>
<pre>
Consider the following code.
```
program string_array
implicit none
character(len=10), dimension(2) :: keys, vals
keys = [character(len=10) :: "user", "dbname"]
vals = [character(len=10) :: "ben", "motivation"]
call show(keys, vals)
contains
subroutine show(akeys, avals)
character(len=*), intent(in) :: akeys(:), avals(:)
integer :: i
do i = 1, size(akeys)
print *, trim(akeys(i)), ": ", trim(avals(i))
end do
end subroutine show
end program string_array
```
When stopped in `show`, the `akeys` and `avals` shows up as array of empty string.
```
(gdb) p akeys
$8 = ('', '')
(gdb) p akeys(1)
$9 = ''
(gdb) p avals
$10 = ('', '')
(gdb) p avals(1)
$11 = ''
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlN1uqzgQx5_G3IxOhAdI4YKLtlFe4VyuDJ6Cd42NbNOj7NOvbJwm6WlXuxEiMB-_-c8YW3ivJkPUs-aFIYpByZkhsuZUiC3M1vXJVAxWXvpXa7yS5CDMBG9Wa_tLmQlGK-kArDyx8jnfj2W-0uvq7OTEAj44ZaY_hHPisnsA1LJqNaoAxhq6GsdZODEGcgxbTYZVJ14y7Bi-glQLGa-sYdgiww5Y9cyqZ_iLLj7634X291IgeYBVJ2DNyzfgK4Qhbj46MaIYohyMWGgfyJUXK_x33kDmhltsUO8iJPU35EfXQmvws_3FsH1oB7uHwNGaIJT51KbfBme3oAxdGeIKEQ8UgK8GzPA5T1iZQCYwbJW5ayXD2vi6x2Xq1fLBjvkTOfjyl2nqUTuAtKDSUHlEe_U33Rq4YwOsTpkASe0rBKeWW1yrkrIuDzsvwH1cVnyN-8CSkSDto6Zo-zzTu4Do_v67_rQB9vvPmQz4YNeVJCgD7Fgm6rFMGmeKlr2XYwnCyPSeNB_LJMDDtoLwkCqBfQNa1nDJ9Q__sgMZtpMc4nKueSWzuW73Txlbhk_pirPbn7rvcrHld966y4iU9XvK3Y7Empf_r15esYd6nP9e8NpuIftKdlUnCur5U1Vyjg02xdzLkUvB6zc5cEFVg8MRWzk-dVXNObXjWKgey6gPW17Wbd0cuKypRN51HZHompbVJS1C6YPW78vBuqlQ3m_Uc161XVNoMZD2-Rx908JM-Rx1fUz4MWyTZ3WplQ_-hggq6HT47hnNiTUvkoYtPsJPZ80Uj4AtHrcOhPfbQhL8LFa67eH9czgUm9P9HMLq0448MzxPKszbcBjtwvAca-a_H6uzf9IYGJ5TD57hObfx3uM_AQAA___bebCZ">