aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2024-04-08 11:01:45 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2024-04-10 17:31:45 -0700
commit936dd627cd90bdfa3f796712c043406958131d7c (patch)
tree1b2952b6e0a1788061da22e7d944b88af1da7fb2 /gcc/cp
parent5c869aa8a4538b218d9e59de6c96133971e7b965 (diff)
downloadgcc-936dd627cd90bdfa3f796712c043406958131d7c.zip
gcc-936dd627cd90bdfa3f796712c043406958131d7c.tar.gz
gcc-936dd627cd90bdfa3f796712c043406958131d7c.tar.bz2
btf: do not skip members of data type with type id BTF_VOID_TYPEID
The previous fix in gen_ctf_sou_type () exposes an issue in BTF generation, however: BTF emission was currently decrementing the vlen (indicating the number of members) to skip members of type CTF_K_UNKNOWN altogether, but still emitting the BTF for the corresponding member (in output_asm_btf_sou_fields ()). One can see malformed BTF by executing the newly added CTF testcase (gcc.dg/debug/ctf/ctf-bitfields-5.c) with -gbtf instead or even existing btf-struct-2.c without this patch. To fix the issue, it makes sense to rather _not_ skip members of data type of type id BTF_VOID_TYPEID. gcc/ChangeLog: * btfout.cc (btf_asm_type): Do not skip emitting members of unknown type. gcc/testsuite/ChangeLog: * gcc.dg/debug/btf/btf-bitfields-4.c: Update the vlen check. * gcc.dg/debug/btf/btf-struct-2.c: Check that member named 'f' with void data type is emitted.
Diffstat (limited to 'gcc/cp')
0 files changed, 0 insertions, 0 deletions