[Bug other/78839] New: DWARF output different between GCC 5 and 6
toconnor at forcepoint dot com
gcc-bugzilla@gcc.gnu.org
Sat Dec 17 00:29:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78839
Bug ID: 78839
Summary: DWARF output different between GCC 5 and 6
Product: gcc
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: toconnor at forcepoint dot com
Target Milestone: ---
Created attachment 40353
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40353&action=edit
sample c code
I've observed a difference in DWARF output for the same input source code
between GCC 5 and GCC 6, specifically in the DW_AT_data_member_location values
for bitfield members of structs. For example,
s.c:
struct s {
unsigned int shutdown:2,
no_check_tx:1,
no_check_rx:1,
userlocks:4,
protocol:8,
type:16;
};
int main() {
struct s s;
return 0;
}
GCC 5 reports DW_AT_data_member_location for all the fields as 0, which is
expected.
GCC 6 reports DW_AT_data_member_location for the "type" and "protocol" fields
as 2 and 1 respectively, all other fields 0 as expected. The DW_AT_bt_offset
fields for "type" and "protocol" change as well.
According to a mailing list posting, this is related to this change:
http://gcc.gnu.org/r231762
More information about the Gcc-bugs
mailing list