This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: PATCH to expand_used_vars for debug/42800
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Feb 2010 23:41:09 +0100
- Subject: Re: RFA: PATCH to expand_used_vars for debug/42800
- References: <4B7F0E4E.4090902@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Feb 19, 2010 at 05:18:54PM -0500, Jason Merrill wrote:
> The problem is this PR is that when are writing out the debug info
> for the temporary containing the upper bound of the VLA, its rtl
> still refers to virtual regs, so dwarf2out gives up and doesn't emit
> any debug info for the upper bound. This happens because the Expand
> from SSA patch broke Jakub's patch for PR 34037, such that
> expand_used_vars is no longer re-adding the variable to
> cfun->local_decls.
>
> The patch adjusts the logic in expand_used_vars so that the PR 34037
> fix is executed again for this variable.
>
> I have also attached a second (alternative) patch which fixes the
> symptom by calling instantiate_decl_rtl from dwarf2out. This patch
> is lower in impact, but I think the first patch is safe enough that
> we don't need to be this conservative.
I'd prefer the first patch. Reminds me we should attempt to do something
useful even for -O+ (make sure we have a debug stmt/DEBUG_INSN for the
bounds and that var-tracking tracks even these artificial vars.
Jakub