summaryrefslogtreecommitdiff
path: root/gcc/cselib.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-01 02:09:00 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-01 02:09:00 +0000
commitc206bb4e96e1a68f7cf0548525600e91bdbbd9df (patch)
tree312250e8d8088ea8f413facab65cc217f6170c86 /gcc/cselib.c
parentf155d038a32f4c8a86bf73e9fdf5d44005afc71d (diff)
downloadlinaro-gcc-c206bb4e96e1a68f7cf0548525600e91bdbbd9df.tar.gz
linaro-gcc-c206bb4e96e1a68f7cf0548525600e91bdbbd9df.tar.bz2
linaro-gcc-c206bb4e96e1a68f7cf0548525600e91bdbbd9df.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180725 138bc75d-0d04-0410-961f-82ee72b054a4
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 b96c0cd07ab..ef397db8d1c 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);