diff options
author | Luis Machado <luisgpm@br.ibm.com> | 2009-06-01 15:20:20 +0000 |
---|---|---|
committer | Luis Machado <luisgpm@gcc.gnu.org> | 2009-06-01 15:20:20 +0000 |
commit | 7eba2d1f3c016517f351372db22bc8f967e0ad65 (patch) | |
tree | 7b3bb3ab22b0a81507404a662e6ff0a5431bdd62 /gcc/alias.c | |
parent | ee88d9aa55398253759a68eba8fec4f05819910a (diff) | |
download | gcc-7eba2d1f3c016517f351372db22bc8f967e0ad65.zip gcc-7eba2d1f3c016517f351372db22bc8f967e0ad65.tar.gz gcc-7eba2d1f3c016517f351372db22bc8f967e0ad65.tar.bz2 |
alias.c (find_base_term): Check for NULL term before returning.
2009-06-01 Luis Machado <luisgpm@br.ibm.com>
* alias.c (find_base_term): Check for NULL term before returning.
From-SVN: r148047
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 4d42778..3488382 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. */ |