<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107998>107998</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][debug] Incorrect value for some Character type dummy arguments.
</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>
If a dummy argument has a type `character (len=*)`, the debugger does not show the value correctly. See the example below.
```
subroutine test (str)
character (len=*) :: str
print *, str
end subroutine test
program main
call test('flang')
call test('flang' // '-new')
end program main
When stopped at line 3, GDB shows the following:
(gdb) p str
$1 = 1851878502
```
Similar code when compiled with gfortran shows the correct value of the `str` variable.
```
(gdb) p str
$1 = 'flang'
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8k89uozAQxp9muIwameH_gUPaKKuee9izgQG8MhjZJtm8_coEtelut1LkCHvG85vP80nn1DAz15A9A5FsVDcCEWSnSK5-NLbetqLGdLf6tUeJ3TpNN5R2WCeePY7SoUR_WxghF-0orWw9WwQqNc-QnICOQBXkAugF_cjYcbMOA1vsDDucjUc3mut2dJF6ZWyNtdx6fTvgG_N2wL_ltGjGhrW5HkCcQBz3NRf7b_t0a2PN6tXM6Nn5gOG8DQDbMeJ_CRGSIyRHDOF77GLVHK44BvT3fZ47_KvMI9BizWDlhJNU83tRqfU9kEqgotdyHoCKR6yvIxDoDHRGoOJp5utjTsD4t9Z9_TnyjM6bZeEOpUcdQJPQxY_T8ya322TtjdbmquYh9P4oKpVD1wRRlo--gdIYITlhXGZxWZSZoC-f4L6-qUlpabE1HeM18LRmWpTmDq_Kjzj0xnor5wea_d33KTD9tgm5CAS5wIu0Sjaav3v-78Efpf8qO-rqpKuSSkZcxwVlVZ5WOUVjLfI4SfJGlpQnaSMSzoqKm7igvE-ruGoiVZOgVFSxiEVKKR2ypI3zos0zmbZtwi2kgiep9EHry3QwdoiUcyvXsSiqqoy0bFi73YQ742ZCW4eEp2YdHKRCK-fdxxVeeb05956RnSB73twF2Qlf58969saiMxPjy7sDNtd-9rM7RKvV9ej94sJQbOM3KD-uzaE1E9A5VN__nhZrfnHrgc5bNw7ovDd0qelPAAAA__8zBk3J">