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 ICE in dwarf2out on VLA in inline function (PR debug/32610)


On 8/21/07, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> The attached testcase ICEs since
> http://gcc.gnu.org/ml/gcc-patches/2006-10/msg00239.html
> on 4.2 branch and the trunk.
> The C frontend now creates a stub TYPE_DECL with DECL_NAME (decl) == NULL
> for VLAs.
> That matches the comment above TYPE_DECL_IS_STUB definition in dwarf2out.c:
> Note that unlike the gcc front end (which generates a NULL named
> TYPE_DECL node for each complete tagged type, each array type, and
> each function type node created) the g++ front end generates a
> _named_ TYPE_DECL node for each tagged type node created.
> These TYPE_DECLs have DECL_ARTIFICIAL set, so we know not to
> generate a DW_TAG_typedef DIE for them.
>
> But gen_decl_die clearly expects in the following spot that
> TYPE_DECL_IS_STUB implies a tagged type, which is true if DECL_NAME (decl)
> != NULL (i.e. DECL_ARTIFICIAL), but is not necessarily true if it is
> unnamed.
>
> Ok for trunk/4.2?

Bootstrapped & tested on ... ?  Ok if so.

Thanks,
Richard.

> 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
>
>         PR debug/32610
>         * dwarf2out.c (gen_decl_die): Don't call
>         gen_tagged_type_instantiation_die if decl doesn't have tagged type.
>
>         * gcc.dg/debug/pr32610.c: New test.


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