[Bug debug/114186] Incorrect CTF generated for multidimensional array
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 5 23:40:55 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114186
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Indu Bhagat <ibhagat@gcc.gnu.org>:
https://gcc.gnu.org/g:5d24bf3afd1bea3e51b87fb7ff24c21e29913999
commit r14-9325-g5d24bf3afd1bea3e51b87fb7ff24c21e29913999
Author: Cupertino Miranda <cupertino.miranda@oracle.com>
Date: Thu Feb 29 10:56:13 2024 -0800
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.
More information about the Gcc-bugs
mailing list