This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE in dwarf2out on VLA in inline function (PR debug/32610)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Aug 2007 13:55:11 +0200
- Subject: Re: [PATCH] Fix ICE in dwarf2out on VLA in inline function (PR debug/32610)
- References: <20070821100853.GJ2063@devserv.devel.redhat.com>
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.