<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/105646>105646</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[flang][debug] Assumed shape array missing stride information.
</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 testcase. When stopped on line 4, the is what gdb prints for arr variable.
```
(gdb) p arr
$1 = ((1, 2) (3, 4))
```
While the result should have been `$1 = ((1, 2) (5, 6))`. The problem seems to be missing stride information on the array type.
```
subroutine show (arr)
integer :: arr(:,:)
print *, arr
! This write is to ensure that variable is not optimized out
arr(2,1) = 15
end subroutine show
program test
interface
subroutine show (array)
integer :: array(:,:)
end subroutine show
end interface
integer :: parray(4,4) = reshape((/1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/),(/4,4/))
call show (parray(1:2,1:2))
end program test
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8lNuOmzwQgJ_G3IyK8HAIXHCREuUJKvXahAn4l8HINrva_-mrMSTbbrsbIRwz52_GVt7rcSFqRfldIKpeD5NAFOUlUVuYrGvjp6S3w1vb2cXrgRyEieBujbGvehkhkA835SmFnxMt4INdVxrALmD0QlAI7KKF9vA6qQDj0MPq9BI83K0D5Ry8KKdVbygV2UVk5-NdZcezb7Eeh15gAyvbPD4WEkR-AYG1wFpyLGQdgXXOm0Jgw8-_PP6ctKGYmiO_mQB-spsZYFIvBD3RAqz6RYSSN9URocpS-DERrM72hmbwRLOHYKEnmLX3jMoHpwcCvdytm1XQdmFMnIFyTr1BeFu_ZOC33tktMFY_2VfOgVE86gPQS6CRHIj8LPJz5IQ1b7CL74fiscQ2gECWv0MFECjhx8QNczrEzgULtPjNMS8Vng1j0WID2DXoWf_Pbd_Cw8seHQV2MgLLLyDLPxKgZYAPNf0hX50dnZrjiB0CrtDd1Y0eUQA-ujiwqLffwMTf33RY5198Pk8sij4m8Qn-9RGBz0DxYODIT2qlfZ4EXnmkGFK-K3U8VZXA7iSwqwV2DQPM-MWaMvJkXcnKkrVlJfAax7DbXR7xrr8P_zPJmzLmyemZohT5eW9VXN_tuN6_-_AczGRo86HJG5VQK09Y5Hg6YZ5MLRZFrqTMs1JVt7JGvJdIVA0NVffTkDWJbjHDIqsRpSxLzFO69aeqxrLEGpusVqLIaFbapMa8zKl1Y6K936iVWVkVVWJUT8YfN9fdqGU8bi7XssG3fhu9KDKjffDvLoIOJl53u0V5EeX3gfqN_8LZ-22mAWKDjjP5-dlNk82Zdgph9XF4rgKvow7T1qc3Owu8ctBj-bY6-x_dgsBrLMJz4_c6Xlr8FQAA__8vJJaE">