diff options
author | Abid Qadeer <haqadeer@amd.com> | 2024-06-11 08:11:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 08:11:46 +0100 |
commit | b64cf381a7cf3d04c1f9297862bc6b1f3b6da4cf (patch) | |
tree | 08bcd01eae1da67126d7f3108d86c66b59c7c79c /llvm/unittests/ADT/APFloatTest.cpp | |
parent | 4cff320e0d4574d5084ad751f9ee3ca22c08afa1 (diff) | |
download | llvm-b64cf381a7cf3d04c1f9297862bc6b1f3b6da4cf.zip llvm-b64cf381a7cf3d04c1f9297862bc6b1f3b6da4cf.tar.gz llvm-b64cf381a7cf3d04c1f9297862bc6b1f3b6da4cf.tar.bz2 |
[flang][debug] Support assumed shape arrays. (#94644)
This PR generates dwarf to extract the information about the arrays from
descriptor. The DWARF needs the offset of the fields like `lower_bound`
and `extent`. The getComponentOffset has been added to calculate
them which pushes the issue of host and target data size into
getDescFieldTypeModel.
As we use data layout now, some tests needed to be adjusted to have a
dummy data layout to avoid failure.
With this change in place, GDB is able show the assumed shape arrays
correctly.
subroutine ff(n, m, arr)
integer n, m
integer :: arr(:, :)
print *, arr
do i = 1, n
do j = 1, m
arr(j, i) = (i * 5) + j + 10
end do
end do
print *, arr
end subroutine ff
Breakpoint 1, ff (n=4, m=3, arr=...) at test1.f90:13
13 print *, arr
(gdb) p arr
$1 = ((6, 7, 8, 9) (11, 12, 13, 14) (16, 17, 18, 19))
(gdb) ptype arr
type = integer (4,3)
(gdb) c
Continuing.
6 7 8 9 11 12 13 14 16 17 18 19
Diffstat (limited to 'llvm/unittests/ADT/APFloatTest.cpp')
0 files changed, 0 insertions, 0 deletions