summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/var-tracking.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 56397af2104..461e326acd7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/50215
+ * var-tracking.c (create_entry_value): Call cselib_lookup_from_insn
+ before adding ENTRY_VALUE to val->locs.
+
2011-08-28 Mikael Pettersson <mikpe@it.uu.se>
PR bootstrap/50218
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index f67b3f5d183..ae45e5215ed 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -8488,13 +8488,13 @@ create_entry_value (rtx rtl, cselib_val *val)
cselib_val *val2;
struct elt_loc_list *el;
el = (struct elt_loc_list *) ggc_alloc_cleared_atomic (sizeof (*el));
- el->next = val->locs;
el->loc = gen_rtx_ENTRY_VALUE (GET_MODE (rtl));
ENTRY_VALUE_EXP (el->loc) = rtl;
- el->setting_insn = get_insns ();
- val->locs = el;
val2 = cselib_lookup_from_insn (el->loc, GET_MODE (rtl), true,
VOIDmode, get_insns ());
+ el->next = val->locs;
+ el->setting_insn = get_insns ();
+ val->locs = el;
if (val2
&& val2 != val
&& val2->locs