This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix problematic debug info for parameters at -O0
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 22 Jun 2016 10:59:23 +0200
- Subject: Re: [patch] Fix problematic debug info for parameters at -O0
- Authentication-results: sourceware.org; auth=none
- References: <2316351 dot JFSQO4hyPt at polaris>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jun 22, 2016 at 10:52:32AM +0200, Eric Botcazou wrote:
> the fix for PR middle-end/61268:
> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213002
> changed validize_mem to modify its argument in-place, which in turns means
> that emit_move_insn can do it too. That's a little surprising, but I guess
> not really problematic in the end, except when the RTX is shared with the
> DECL_RTL of a DECL node, because this DECL_RTL is also used for the debug info
> at -O0; it's typically a MEM based on VIRTUAL_STACK_VARS_REGNUM initially but
> it can be changed into a MEM based on a pseudo which then can be assigned a
> volatile register by RA, in which case the debug info would be based on this
> volatile register instead of the frame pointer, which can break backtraces.
>
> The attached patch fixes one of those cases in assign_parm_setup_reg, which
> results in broken backtraces for Visium and PowerPC/EABI for some testcase.
>
> Tested on x86_64-suse-linux, OK for the mainline? What about the release
> branches (5 & 6 are affected), is the issue worth fixing there too?
>
>
> 2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
>
> * function.c (assign_parm_setup_reg): Prevent sharing in another case.
Ok, even for branches I think, but would be nice to have a corresponding
guality testcase (perhaps just for -O0 with dg-skip-if) which fails without
this patch and succeeds with it.
Jakub