This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR82144


On Sep 21, 2017, Richard Biener <rguenther@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 <aoliva@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]