[PR63238] output alignment debug information
authorAlexandre Oliva <aoliva@redhat.com>
Tue, 31 Jan 2017 01:03:15 +0000 (01:03 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Tue, 31 Jan 2017 01:03:15 +0000 (01:03 +0000)
commit40fb9c89e1599b2f13d1403820a9e0fb2c1129c1
treebd7e18a3bfffb6f7f868945825933f23ce1b6d9a
parent8db29d88f3e8d5fc43b25d9e0049c25f6bfb74d1
[PR63238] output alignment debug information

Output DWARFv5+ DW_AT_alignment for non-default alignment of
variables, fields and types.

for gcc/ChangeLog

PR debug/63238
* dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
(add_alignment_attribute): New.
(base_type_die): Add alignment attribute.
(subrange_type_die): Likewise.
(modified_type_die): Likewise.
(gen_array_type_die): Likewise.
(gen_descr_array_type_die: Likewise.
(gen_enumeration_type_die): Likewise.
(gen_subprogram_die): Likewise.
(gen_variable_die): Likewise.
(gen_field_die): Likewise.
(gen_ptr_to_mbr_type_die): Likewise.
(gen_struct_or_union_type_die): Likewise.
(gen_subroutine_type_die): Likewise.
(gen_typedef_die): Likewise.
(base_type_cmp): Compare alignment attribute.

for gcc/testsuite/ChangeLog

PR debug/63238
* gcc.dg/debug/dwarf2/align-1.c: New.
* gcc.dg/debug/dwarf2/align-2.c: New.
* gcc.dg/debug/dwarf2/align-3.c: New.
* gcc.dg/debug/dwarf2/align-4.c: New.
* gcc.dg/debug/dwarf2/align-5.c: New.
* gcc.dg/debug/dwarf2/align-6.c: New.
* gcc.dg/debug/dwarf2/align-as-1.c: New.
* g++.dg/debug/dwarf2/align-1.C: New.
* g++.dg/debug/dwarf2/align-2.C: New.
* g++.dg/debug/dwarf2/align-3.C: New.
* g++.dg/debug/dwarf2/align-4.C: New.
* g++.dg/debug/dwarf2/align-5.C: New.
* g++.dg/debug/dwarf2/align-6.C: New.

From-SVN: r245052
16 files changed:
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/align-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/debug/dwarf2/align-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/debug/dwarf2/align-3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/debug/dwarf2/align-4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/debug/dwarf2/align-5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/debug/dwarf2/align-6.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/align-as-1.c [new file with mode: 0644]