summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorluisgpm <luisgpm@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-01 15:20:20 +0000
committerluisgpm <luisgpm@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-01 15:20:20 +0000
commit02b0d16719b0d554d8aee6672cc13949f2cbd8f2 (patch)
tree7b3bb3ab22b0a81507404a662e6ff0a5431bdd62 /gcc/alias.c
parenta56c46d23e2c6f399baf47b409b668cccbca0ccf (diff)
downloadgcc-02b0d16719b0d554d8aee6672cc13949f2cbd8f2.tar.gz
2009-06-01 Luis Machado <luisgpm@br.ibm.com>
* alias.c (find_base_term): Check for NULL term before returning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148047 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 4d42778a644..3488382df6c 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1511,10 +1511,18 @@ find_base_term (rtx x)
/* If either operand is known to be a pointer, then use it
to determine the base term. */
if (REG_P (tmp1) && REG_POINTER (tmp1))
- return find_base_term (tmp1);
+ {
+ rtx base = find_base_term (tmp1);
+ if (base)
+ return base;
+ }
if (REG_P (tmp2) && REG_POINTER (tmp2))
- return find_base_term (tmp2);
+ {
+ rtx base = find_base_term (tmp2);
+ if (base)
+ return base;
+ }
/* Neither operand was known to be a pointer. Go ahead and find the
base term for both operands. */