https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101283
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Indu Bhagat <ibha...@gcc.gnu.org>: https://gcc.gnu.org/g:151b423a82f4bf15e3225833028f5258ea254cb9 commit r12-2090-g151b423a82f4bf15e3225833028f5258ea254cb9 Author: Indu Bhagat <indu.bha...@oracle.com> Date: Tue Jul 6 13:53:58 2021 -0700 dwarf2ctf: the unit of sou field location is bits [PR101283] If the value of the DW_AT_data_member_location attribute is constant, the associated unit is bytes. This patch amends incorrect behaviour which was being exercised with -gdwarf-2. This caused some of the failures as noted in PR debug/101283 (specifically the BTF tests involving btm_offset). The testcase ctf-struct-array-2.c was erroneously checking for the value of ctm_offset in number of bytes. The patch fixes the calculation of the field location value for a struct member in dwarf2ctf and adjusts the testcase. This patch also fixes some of the failing tests as noted in PR debug/101283. 2021-07-06 Indu Bhagat <indu.bha...@oracle.com> gcc/ChangeLog: PR debug/101283 * dwarf2ctf.c (ctf_get_AT_data_member_location): Multiply by 8 to get number of bits. gcc/testsuite/ChangeLog: PR debug/101283 * gcc.dg/debug/ctf/ctf-struct-array-2.c: Adjust the value in the testcase.