diff options
author | David Faust <david.faust@oracle.com> | 2025-08-28 09:12:55 -0700 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2025-09-09 08:56:54 -0700 |
commit | 50efa788a4b6c7f619101b6156b47b91124c6dd3 (patch) | |
tree | 56dd0117c9c1640d04708b08996ad4eabbf8f737 /gcc/testsuite/gcc.target/i386/pr120427-4.c | |
parent | fce05f607c8ff32713d31dec7c907da00b23f793 (diff) | |
download | gcc-master.zip gcc-master.tar.gz gcc-master.tar.bz2 |
DWARF to CTF translation for type bit sizes was using uint32_t, and for
member offsets was inadvertently using unsigned int via get_AT_unsigned.
For very large struct types, at least one of these could be truncated
causing incorrect encoding of the struct type and member offsets.
Use HOST_WIDE_INT to avoid these truncation issues and fix the encoding
for large structs.
PR debug/121411
gcc/
* dwarf2ctf.cc (ctf_get_AT_data_member_location) Use AT_unsigned
when fetching AT_bit_offset and AT_data_member_location. Simplify.
(ctf_die_bitsize): Return unsigned HOST_WIDE_INT instead of
uint32_t.
(gen_ctf_base_type, gen_ctf_sou_type, gen_ctf_enumeration_type):
Adapt accordingly.
gcc/testsuite/
* gcc.dg/debug/ctf/ctf-struct-3.c: New test.
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr120427-4.c')
0 files changed, 0 insertions, 0 deletions