Patchwork Fix PR target/48220 for the SPARC

login
register
mail settings
Submitter Eric Botcazou
Date July 22, 2011, 6:46 p.m.
Message ID <201107222046.56583.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/106377/
State New
Headers show

Comments

Eric Botcazou - July 22, 2011, 6:46 p.m.
> > 	* doc/md.texi (Standard Names): Document window_save.
> > 	* cfgexpand.c (expand_debug_parm_decl): New function extracted from
> > 	expand_debug_expr and expand_debug_source_expr.  If the target has
> > 	a window_save instruction, adjust the ENTRY_VALUE_EXP.
> > 	(expand_debug_expr) <SSA_NAME>: Call expand_debug_parm_decl if the
> > 	SSA_NAME_VAR is a parameter.
> > 	(expand_debug_source_expr) <PARM_DECL>: Call expand_debug_parm_decl.
> > 	* var-tracking.c (parm_reg_t): New type and associated vector type.
> > 	(windowed_parm_regs): New variable.
> > 	(adjust_insn): If the target has a window_save instruction and this
> > 	is the instruction, make its effect on parameter registers explicit.
> > 	(next_non_note_insn_var_location): New function.
> > 	(emit_notes_in_bb): Use it instead of NEXT_INSN throughout.
> > 	(vt_add_function_parameter): If the target has a window_save insn,
> > 	adjust the incoming RTL and record that in windowed_parm_regs.
> > 	(vt_finalize): Free windowed_parm_regs.
>
> Ok.

Thanks.  As found out by Rainer, I made a stupid mistake in the last hunk.
Tested on i586-suse-linux, pre-approved by Jakub, applied on the mainline.


2011-07-22  Eric Botcazou  <ebotcazou@adacore.com>

	PR debug/49815
	* var-tracking.c (vt_finalize): Always free windowed_parm_regs.

Patch

Index: var-tracking.c
===================================================================
--- var-tracking.c	(revision 176622)
+++ var-tracking.c	(working copy)
@@ -9135,9 +9135,10 @@  vt_finalize (void)
       cselib_finish ();
       BITMAP_FREE (scratch_regs);
       scratch_regs = NULL;
-      VEC_free (parm_reg_t, gc, windowed_parm_regs);
     }
 
+  VEC_free (parm_reg_t, gc, windowed_parm_regs);
+
   if (vui_vec)
     XDELETEVEC (vui_vec);
   vui_vec = NULL;