https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119711
Bug ID: 119711 Summary: dw_attr_struct and dw_loc_descr_node are wasteful with padding Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- typedef struct GTY(()) dw_attr_struct { enum dwarf_attribute dw_attr; dw_val_node dw_attr_val; } dw_attr_node; struct GTY(()) dw_val_node { enum dw_val_class val_class; struct addr_table_entry * GTY(()) val_entry; union dw_val_struct_union { ... GTY ((desc ("%1.val_class"))) v; }; there's two 4 byte holes after the enums, the whole thing is 40 bytes instead of 32. It's also dw_val_node::val_entry is only ever != NULL with -gsplit-dwarf. dw_loc_descr_node has pointer, then 8+1+1 bitfields, then int dw_loc_addr and then 2 dw_val_node elts. At least naming the padding in dw_val_node for outside use can improve things.