https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66448
Aldy Hernandez <aldyh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35734|0 |1
is obsolete| |
--- Comment #17 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Created attachment 35744
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35744&action=edit
Call check_die on type DIEs and avoid DW_AT_aritificial attribs
On 06/10/2015 04:01 AM, iains at gcc dot gnu.org wrote:>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66448
>
> --- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> ---
> (In reply to Aldy Hernandez from comment #14)
>> Created attachment 35734 [details]
>> Patch to ICE on other duplicate DW_AT_ attributes
>
>> I can't reproduce any of these with a cross compiler. I'm building a cross
>> with:
>>
>> --enable-languages=c,c++ --disable-bootstrap --disable-multilib
>> --target=i686-darwin
>
> The triple for the platform I'm testing on is : x86_64-apple-darwin12
As a side note, if *-apple-darwin{10,12} is the more common variant (as opposed
to *-apple-darwin which uses stabs), may I suggest speaking with the SC to put
a more recent darwin on the secondary platform list instead of
i686-apple-darwin which is stabs (and nobody cares bout stabs ;-)).
>> ...but I still can't get cc1plus to trigger any ICE with the attached patch.
>
> me neither - nevertheless...
Well, I was testing stabs apparently, but even so, the reason why the ICE did
not trigger was because the duplicate attributes appear on a type DIE, not a
decl DIE. I was able to reproduce by looking at the assembly.
I added a check for type DIEs and found a slew of problems on Linux as well.
It seems the Linux linker is far more permissive wrt dwarf. The attached patch
fixes all the problems you reported that I could reproduce with a cross
compiler for x86_64-apple-darwin10. It also passes bootstrap and tests on
x86-64 Linux.
Could you test it properly on darwin?