diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28db5f9ec48..a53f8845753 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-01-02 Jakub Jelinek + + PR bootstrap/51725 + * cselib.c (add_mem_for_addr): Call canonical_cselib_val + on mem_elt first. + 2012-01-02 Sandra Loosemore * doc/invoke.texi (-flto and related options): Copy-edit. diff --git a/gcc/cselib.c b/gcc/cselib.c index 4324ffe5029..fc86ef1affe 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -1,7 +1,7 @@ /* Common subexpression elimination library for GNU compiler. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, + 2012 Free Software Foundation, Inc. This file is part of GCC. @@ -1264,6 +1264,8 @@ add_mem_for_addr (cselib_val *addr_elt, cselib_val *mem_elt, rtx x) { struct elt_loc_list *l; + mem_elt = canonical_cselib_val (mem_elt); + /* Avoid duplicates. */ for (l = mem_elt->locs; l; l = l->next) if (MEM_P (l->loc)