libdw: Use signedness of subrange type to determine array bounds
authorMark Wielaard <mark@klomp.org>
Wed, 6 Oct 2021 20:41:29 +0000 (22:41 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 18 Oct 2021 11:37:08 +0000 (13:37 +0200)
commitc3a6a9dfc6ed0c24ab2d11b2d71f425b479575c9
tree5aa0b84f3b61e74d04afe58c03294a2098f68d65
parentaa0765aa93ce3e74283498a310333c9bff2223db
libdw: Use signedness of subrange type to determine array bounds

When calculating the array size check if the subrange has an associate
type, if it does then check the type to determine whether the upper
and lower values need to be interpreted as signed of unsigned
values. We default to signed because that is what the testcase
run-aggregate-size.sh testfile-size4 expects (this is an hardwritten
testcase, we could have chosen a different default).

https://sourceware.org/bugzilla/show_bug.cgi?id=28294

Signed-off-by: Mark Wielaard <mark@klomp.org>
libdw/ChangeLog
libdw/dwarf_aggregate_size.c