aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cselib.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76c083c..3b86f2b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-21 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/53682
+ * cselib.c (promote_debug_loc): Don't crash on NULL argument.
+
2012-06-21 Meador Inge <meadori@codesourcery.com>
PR c/53702
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 5e6d049..d338c31 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -322,7 +322,7 @@ new_elt_loc_list (cselib_val *val, rtx loc)
static inline void
promote_debug_loc (struct elt_loc_list *l)
{
- if (l->setting_insn && DEBUG_INSN_P (l->setting_insn)
+ if (l && l->setting_insn && DEBUG_INSN_P (l->setting_insn)
&& (!cselib_current_insn || !DEBUG_INSN_P (cselib_current_insn)))
{
n_debug_values--;