Fix PR82144

Message ID alpine.LSU.2.20.1709121542420.26836@zhemvz.fhfr.qr
State New
Headers show
Series
  • Fix PR82144
Related show

Commit Message

Richard Biener Sept. 12, 2017, 1:46 p.m.
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.

Patch

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;