On Sep 21, 2017, Richard Biener <rguent...@suse.de> wrote: > On Tue, 12 Sep 2017, Richard Biener wrote: >> >> 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?
> Alex, ping? Sorry, still catching up after Cauldron and recovery from the bug I caught at the conference ;-) Since incomplete enum types are non-standard, there's no standard to guide us. Pointers (the primary viable use of such types) generally benefit from alignment information, but I don't see how the alignment could be meaningfully determined for such types. For debug information, we're probably better off leaving any tentative or uninitialized alignment information out of the DIE, so the patch looks good to me. Thanks for your patience! Reviewed-by: Alexandre Oliva <aol...@redhat.com> >> PR middle-end/82144 >> * dwarf2out.c (gen_enumeration_type_die): Do not add alignment >> attribute for incomplete types nor twice for complete ones. -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer