diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2024-03-08 13:33:42 +0000 |
---|---|---|
committer | Cupertino Miranda <cupertino.miranda@oracle.com> | 2024-03-20 20:27:16 +0000 |
commit | f10c18df9c02dc518360426c021971838e0012d2 (patch) | |
tree | 22bda6703d1f7f26ac42dd12e04fa8d52440ea9f /libgcc | |
parent | 624d025f62fdbc969cca08fdb1ac77246b8535a5 (diff) | |
download | gcc-f10c18df9c02dc518360426c021971838e0012d2.zip gcc-f10c18df9c02dc518360426c021971838e0012d2.tar.gz gcc-f10c18df9c02dc518360426c021971838e0012d2.tar.bz2 |
bpf: Corrected index computation when present with unnamed struct fields
Any unnamed non-struct-or-union field is not a member of the
BTF_KIND_STRUCT.
For that reason, CO-RE access strings indexes should take that in
consideration. This patch adds a condition to the incrementer that
computes the index for the field access.
gcc/ChangeLog:
* config/bpf/core-builtins.cc (bpf_core_get_index): Check if
field contains a DECL_NAME.
gcc/testsuite/ChangeLog:
* gcc.target/bpf/core-builtin-fieldinfo-offset-1.c: Add
testcase for unnamed fields.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions