re PR debug/51746 (Segfault in cselib_preserved_value_p)
authorJakub Jelinek <jakub@redhat.com>
Thu, 5 Jan 2012 00:29:13 +0000 (01:29 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 5 Jan 2012 00:29:13 +0000 (01:29 +0100)
PR debug/51746
* var-tracking.c (add_stores): For COND_EXEC allow oval to be NULL.

From-SVN: r182897

gcc/ChangeLog
gcc/var-tracking.c

index 3d9bc63654c428b5d521fed7d362470632bc583d..a30063a915aaa325280bd64507e65b7af4626be1 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-05  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/51746
+       * var-tracking.c (add_stores): For COND_EXEC allow oval to be NULL.
+
 2012-01-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR tree-optimization/51624
index 27bff38751c57f3214cc283c61f21e401ab8dae9..557a2ca41dcf916539bbf130e911fd48b3d0f2eb 100644 (file)
@@ -1,5 +1,5 @@
 /* Variable tracking routines for the GNU compiler.
-   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
+   Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
 
    This file is part of GCC.
@@ -5519,7 +5519,7 @@ add_stores (rtx loc, const_rtx expr, void *cuip)
       gcc_assert (oval != v);
       gcc_assert (REG_P (oloc) || MEM_P (oloc));
 
-      if (!cselib_preserved_value_p (oval))
+      if (oval && !cselib_preserved_value_p (oval))
        {
          micro_operation moa;