This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA][PR 41063] ICE in output_die
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Cary Coutant <ccoutant at google dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Dodji Seketeli <dodji at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 21 Oct 2010 19:16:12 -0700
- Subject: Re: [RFA][PR 41063] ICE in output_die
- References: <c17be2b30908131635o4cf1da09i9be67f8379e956f9@mail.gmail.com> <c17be2b30908131706n17143acag18c4ec0088de3a4f@mail.gmail.com> <4A8559C6.3050302@redhat.com> <c17be2b30908141417x2b0d4fe3qd73dbbb1596e67bc@mail.gmail.com> <c17be2b30908141740g36a09c4cu486198874e59f037@mail.gmail.com> <4A958731.2070900@redhat.com> <c17be2b30908271610v78d0d6c2u8cbe8b11e7bb606d@mail.gmail.com>
On Thu, Aug 27, 2009 at 4:10 PM, Cary Coutant <ccoutant@google.com> wrote:
>>> + ? ? ? ? ?if (decl_function_context (TYPE_STUB_DECL (TREE_TYPE (type))))
>>
>> This doesn't seem like the right test; it will be true for a nested class
>> within a local class, which I don't think is what we want.
>
> Yes, I think you're right.
>
>> Also, it seems like we should be handling this issue in the ENUMERAL_TYPE
>> etc section, where we already have some code to adjust context_die, rather
>> than in the POINTER_TYPE section. ?I guess we just need a function scope
>> case; the current code seems to assume that a type has either class or
>> namespace scope.
>
> OK, here's another stab at it. This patch adds a check for the
> function scope case (but only the immediate context) and calls
> lookup_decl_die on the function decl to set context_die. If a DIE for
> that function hasn't been created yet, it'll use NULL and do the right
> thing later when the function DIE does get written.
>
> This bootstraps on x86_64-linux. The test suite is still running, but
> it looks good so far. Assuming it finishes clean, does this look OK?
>
> -cary
>
>
> gcc/ChangeLog:
>
> ? ? ? ?PR debug/41063
> ? ? ? ?* dwarf2out.c (gen_type_die_with_usage): Use proper context for
> ? ? ? ?struct/union/enum types local to a function.
>
This caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46123
--
H.J.