From 24f8d71e41a1d5bcb717356dabeffadb10a75b6f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 16 Apr 2010 23:43:36 +0200 Subject: re PR bootstrap/43767 (Revision 158401 failed to bootstrap) PR bootstrap/43767 * alias.c (memrefs_conflict_p): Don't crash if CSELIB_VAL_PTR is NULL. From-SVN: r158450 --- gcc/alias.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'gcc/alias.c') diff --git a/gcc/alias.c b/gcc/alias.c index 6ec51ec..a1e12fb 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1792,10 +1792,11 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) { if (REG_P (y)) { - struct elt_loc_list *l; - for (l = CSELIB_VAL_PTR (x)->locs; l; l = l->next) - if (REG_P (l->loc) && rtx_equal_for_memref_p (l->loc, y)) - break; + struct elt_loc_list *l = NULL; + if (CSELIB_VAL_PTR (x)) + for (l = CSELIB_VAL_PTR (x)->locs; l; l = l->next) + if (REG_P (l->loc) && rtx_equal_for_memref_p (l->loc, y)) + break; if (l) x = y; else @@ -1809,10 +1810,11 @@ memrefs_conflict_p (int xsize, rtx x, int ysize, rtx y, HOST_WIDE_INT c) { if (REG_P (x)) { - struct elt_loc_list *l; - for (l = CSELIB_VAL_PTR (y)->locs; l; l = l->next) - if (REG_P (l->loc) && rtx_equal_for_memref_p (l->loc, x)) - break; + struct elt_loc_list *l = NULL; + if (CSELIB_VAL_PTR (y)) + for (l = CSELIB_VAL_PTR (y)->locs; l; l = l->next) + if (REG_P (l->loc) && rtx_equal_for_memref_p (l->loc, x)) + break; if (l) y = x; else -- cgit v1.1