This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR82144
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: aoliva at redhat dot com
- Date: Tue, 12 Sep 2017 15:46:12 +0200 (CEST)
- Subject: [PATCH] Fix PR82144
- Authentication-results: sourceware.org; auth=none
The following avoids adding DW_AT_alignment twice by not doing it
for incomplete types.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
Alex, is that ok or do we want DW_AT_alignment for incomplete types as
well?
Thanks,
Richard.
2017-09-12 Richard Biener <rguenther@suse.de>
PR middle-end/82144
* dwarf2out.c (gen_enumeration_type_die): Do not add alignment
attribute for incomplete types nor twice for complete ones.
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 252002)
+++ gcc/dwarf2out.c (working copy)
@@ -21258,8 +21258,6 @@ gen_enumeration_type_die (tree type, dw_
else
add_AT_flag (type_die, DW_AT_declaration, 1);
- add_alignment_attribute (type_die, type);
-
add_pubtype (type, type_die);
return type_die;