https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101378
--- Comment #9 from Pedro Alves <pedro at palves dot net> --- > 2021-11-09 Jakub Jelinek <ja...@redhat.com> > > PR debug/101378 > * dwarf2out.c (field_byte_offset): Do the PCC_BITFIELD_TYPE_MATTERS > handling only for DECL_BIT_FIELD decls. > > ... > > fixes this for me. I gave the patch a try, and all the testcases posted in this bugzilla now show correct DWARF AFAICT. Thank you!