aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-03-26 21:54:43 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-03-26 21:54:43 +0100
commite80691a0d79f8245f4bf08c4173b0f127404f2d0 (patch)
treecd698261470944727b0a0ac8e1ecb90cbb4452e6 /gcc/dwarf2out.c
parent89245ef27b0846d47bceab52811ec6e529caa272 (diff)
downloadgcc-e80691a0d79f8245f4bf08c4173b0f127404f2d0.zip
gcc-e80691a0d79f8245f4bf08c4173b0f127404f2d0.tar.gz
gcc-e80691a0d79f8245f4bf08c4173b0f127404f2d0.tar.bz2
var-tracking.c (emit_note_insn_var_location): For one part notes with offset 0, don't add EXPR_LIST around the location.
* var-tracking.c (emit_note_insn_var_location): For one part notes with offset 0, don't add EXPR_LIST around the location. * dwarf2out.c (loc_descriptor, dw_loc_list_1, add_location_or_const_value_attribute): Adjust for that change. From-SVN: r157763
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index bd75de9..a3de759 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -13731,10 +13731,12 @@ loc_descriptor (rtx rtl, enum machine_mode mode,
case VAR_LOCATION:
/* Single part. */
- if (GET_CODE (XEXP (rtl, 1)) != PARALLEL)
+ if (GET_CODE (PAT_VAR_LOCATION_LOC (rtl)) != PARALLEL)
{
- loc_result = loc_descriptor (XEXP (XEXP (rtl, 1), 0), mode,
- initialized);
+ rtx loc = PAT_VAR_LOCATION_LOC (rtl);
+ if (GET_CODE (loc) == EXPR_LIST)
+ loc = XEXP (loc, 0);
+ loc_result = loc_descriptor (loc, mode, initialized);
break;
}
@@ -13986,9 +13988,11 @@ dw_loc_list_1 (tree loc, rtx varloc, int want_address,
{
gcc_assert (GET_CODE (varloc) == VAR_LOCATION);
/* Single part. */
- if (GET_CODE (XEXP (varloc, 1)) != PARALLEL)
+ if (GET_CODE (PAT_VAR_LOCATION_LOC (varloc)) != PARALLEL)
{
- varloc = XEXP (XEXP (varloc, 1), 0);
+ varloc = PAT_VAR_LOCATION_LOC (varloc);
+ if (GET_CODE (varloc) == EXPR_LIST)
+ varloc = XEXP (varloc, 0);
mode = GET_MODE (varloc);
if (MEM_P (varloc))
{
@@ -15891,7 +15895,7 @@ add_location_or_const_value_attribute (dw_die_ref die, tree decl,
node = loc_list->first;
rtl = NOTE_VAR_LOCATION_LOC (node->var_loc_note);
- if (GET_CODE (rtl) != PARALLEL)
+ if (GET_CODE (rtl) == EXPR_LIST)
rtl = XEXP (rtl, 0);
if ((CONSTANT_P (rtl) || GET_CODE (rtl) == CONST_STRING)
&& add_const_value_attribute (die, rtl))