diff mbox

[google/4.6] For -gfission, remove address table entry when removing location list entry (issue5900045)

Message ID 20120323224014.8AE00E1683@ccoutant.mtv.corp.google.com
State New
Headers show

Commit Message

Cary Coutant March 23, 2012, 10:40 p.m. UTC
2012-03-23   Cary Coutant  <ccoutant@google.com>

	* dwarf2out.c (resolve_addr): Remove address table entry for symbol
	when removing location list entry.



--
This patch is available for review at http://codereview.appspot.com/5900045

Comments

Sterling Augustine March 23, 2012, 10:45 p.m. UTC | #1
On Fri, Mar 23, 2012 at 3:40 PM, Cary Coutant <ccoutant@google.com> wrote:
>
> 2012-03-23   Cary Coutant  <ccoutant@google.com>
>
>        * dwarf2out.c (resolve_addr): Remove address table entry for symbol
>        when removing location list entry.
>
>
> Index: dwarf2out.c
> ===================================================================
> --- dwarf2out.c (revision 185594)
> +++ dwarf2out.c (working copy)
> @@ -23803,11 +23803,15 @@ resolve_addr (dw_die_ref die)
>                if (!resolve_addr_in_expr ((*curr)->expr))
>                  {
>                    dw_loc_list_ref next = (*curr)->dw_loc_next;
> +                   dw_loc_descr_ref l = (*curr)->expr;
> +
>                    if (next && (*curr)->ll_symbol)
>                      {
>                        gcc_assert (!next->ll_symbol);
>                        next->ll_symbol = (*curr)->ll_symbol;
>                      }
> +                   if (l->dw_loc_oprnd1.val_index != -1U)
> +                     remove_addr_table_entry
> (l->dw_loc_oprnd1.val_index);
>                    *curr = next;
>                  }
>                else
>
> --
> This patch is available for review at
> http://codereview.appspot.com/5900045

This patch is OK for Google 4.6.

Sterling
diff mbox

Patch

Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 185594)
+++ dwarf2out.c	(working copy)
@@ -23803,11 +23803,15 @@  resolve_addr (dw_die_ref die)
 		if (!resolve_addr_in_expr ((*curr)->expr))
 		  {
 		    dw_loc_list_ref next = (*curr)->dw_loc_next;
+		    dw_loc_descr_ref l = (*curr)->expr;
+
 		    if (next && (*curr)->ll_symbol)
 		      {
 			gcc_assert (!next->ll_symbol);
 			next->ll_symbol = (*curr)->ll_symbol;
 		      }
+		    if (l->dw_loc_oprnd1.val_index != -1U)
+		      remove_addr_table_entry (l->dw_loc_oprnd1.val_index);
 		    *curr = next;
 		  }
 		else