summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-26 20:21:58 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2012-06-26 20:21:58 +0000
commit0d11fd38f21ed0128873d6a20afaeabc0a04e772 (patch)
tree13601bfd367a3e97d7fd398bed52017519f2ee63
parentd320bacfccf0540f1e329d21fa2f5a0c89a9a073 (diff)
downloadgcc-0d11fd38f21ed0128873d6a20afaeabc0a04e772.tar.gz
PR debug/53682
* cselib.c (promote_debug_loc): Don't crash on NULL argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188997 138bc75d-0d04-0410-961f-82ee72b054a4
-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 f0e3896df6d..d420ac45fcc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-26 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/53682
+ * cselib.c (promote_debug_loc): Don't crash on NULL argument.
+
2012-06-26 Nick Clifton <nickc@redhat.com>
* config/rx/rx.md (simple_return): Use the simple_return rtx.
diff --git a/gcc/cselib.c b/gcc/cselib.c
index 56f2b7f9ffe..87fb89b47cb 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -323,7 +323,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--;