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: RFA: PATCH to expand_used_vars for debug/42800


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


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