re PR target/53682 (ICE in cselib_lookup (SEGV) on i586-linux-gnu)
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 22 Jun 2012 01:29:28 +0000 (01:29 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 22 Jun 2012 01:29:28 +0000 (01:29 +0000)
PR debug/53682
* cselib.c (promote_debug_loc): Don't crash on NULL argument.

From-SVN: r188866

gcc/ChangeLog
gcc/cselib.c

index 76c083c7b09e54968f6801aa0b59623cf04e490f..3b86f2b632342feac2c2c47567a09c5626c108a8 100644 (file)
@@ -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
index 5e6d049b0e37c2f280a17da2280d17b37102f1a2..d338c31be1aae163a2f3c3ea79fd6ab21c227f08 100644 (file)
@@ -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--;