This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix dwarf2out for DECL_BY_REFERENCE (PR debug/33537)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: "Jason Merrill" <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Oct 2007 23:21:10 +0100
- Subject: Re: [PATCH] Fix dwarf2out for DECL_BY_REFERENCE (PR debug/33537)
- References: <20071031211434.GW5451@devserv.devel.redhat.com>
On 10/31/07, Jakub Jelinek <email@example.com> wrote:
> If a PARM_DECL or RESULT_DECL has DECL_BY_REFERENCE set by cp-gimplify.c,
> then its type is a REFERENCE_TYPE of the real type as present in the
> original sources. But for debuginfo we need to undo that and tell the
> debugger the right type of the parameters or result.
> Bootstrapped/regtested on x86_64-linux, tested on the testcase from bugzilla
> using gdb. Ok for trunk?
Ok if you test this against the gdb testsuite (maybe add a testcase to it
for this case?)
> 2007-10-31 Jakub Jelinek <firstname.lastname@example.org>
> PR debug/33537
> * dwarf2out.c (gen_formal_parameter_die, gen_variable_die,
> gen_decl_die): Use TREE_TYPE (TREE_TYPE (decl)) as type
> rather than TREE_TYPE (decl) if DECL_BY_REFERENCE (decl).