aboutsummaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2011-11-01 02:09:00 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2011-11-01 02:09:00 +0000
commit5a9fbcf14adbf0aef998c7b205298a96a7bd8841 (patch)
tree312250e8d8088ea8f413facab65cc217f6170c86 /gcc/cselib.c
parent03e0010d71efedb4a5a9718a68fc4ffdd9e24f5b (diff)
downloadgcc-5a9fbcf14adbf0aef998c7b205298a96a7bd8841.zip
gcc-5a9fbcf14adbf0aef998c7b205298a96a7bd8841.tar.gz
gcc-5a9fbcf14adbf0aef998c7b205298a96a7bd8841.tar.bz2
re PR debug/50869 (ice in vt_expand_var_loc_chain)
PR debug/50869 * cselib.c (cfa_base_preserved_regno): Initialize. (cselib_expand_value_rtx_1): Don't expand it. * var-tracking.c (vt_expand_var_loc_chain): Initialize depth. Check it's only zero if result is NULL. From-SVN: r180725
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r--gcc/cselib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c
index b96c0cd..ef397db 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -185,7 +185,7 @@ static cselib_val dummy_val;
that is constant through the whole function and should never be
eliminated. */
static cselib_val *cfa_base_preserved_val;
-static unsigned int cfa_base_preserved_regno;
+static unsigned int cfa_base_preserved_regno = INVALID_REGNUM;
/* Used to list all values that contain memory reference.
May or may not contain the useless values - the list is compacted
@@ -1451,7 +1451,7 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
if (GET_MODE (l->elt->val_rtx) == GET_MODE (orig))
{
rtx result;
- int regno = REGNO (orig);
+ unsigned regno = REGNO (orig);
/* The only thing that we are not willing to do (this
is requirement of dse and if others potential uses
@@ -1471,7 +1471,8 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd,
make the frame assumptions. */
if (regno == STACK_POINTER_REGNUM
|| regno == FRAME_POINTER_REGNUM
- || regno == HARD_FRAME_POINTER_REGNUM)
+ || regno == HARD_FRAME_POINTER_REGNUM
+ || regno == cfa_base_preserved_regno)
return orig;
bitmap_set_bit (evd->regs_active, regno);