diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2024-02-29 10:56:13 -0800 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2024-03-05 15:40:23 -0800 |
commit | 5d24bf3afd1bea3e51b87fb7ff24c21e29913999 (patch) | |
tree | 66a5df5742930ae9325d71d744d362895ddb9b6e /gcc/system.h | |
parent | fca6f6fddb22b8665e840f455a7d0318d4575227 (diff) | |
download | gcc-5d24bf3afd1bea3e51b87fb7ff24c21e29913999.zip gcc-5d24bf3afd1bea3e51b87fb7ff24c21e29913999.tar.gz gcc-5d24bf3afd1bea3e51b87fb7ff24c21e29913999.tar.bz2 |
ctf: fix incorrect CTF for multi-dimensional array types
PR debug/114186
DWARF DIEs of type DW_TAG_subrange_type are linked together to represent
the information about the subsequent dimensions. The CTF processing was
so far working through them in the opposite (incorrect) order.
While fixing the issue, refactor the code a bit for readability.
co-authored-By: Indu Bhagat <indu.bhagat@oracle.com>
gcc/
PR debug/114186
* dwarf2ctf.cc (gen_ctf_array_type): Invoke the ctf_add_array ()
in the correct order of the dimensions.
(gen_ctf_subrange_type): Refactor out handling of
DW_TAG_subrange_type DIE to here.
gcc/testsuite/
PR debug/114186
* gcc.dg/debug/ctf/ctf-array-6.c: Add test.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions