tree-pretty-print (dump_generic_node): Test for NULL_TREE before accessing TREE_TYPE.
authorTom de Vries <tom@codesourcery.com>
Fri, 26 Aug 2011 13:03:58 +0000 (13:03 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Fri, 26 Aug 2011 13:03:58 +0000 (13:03 +0000)
2011-08-26  Tom de Vries  <tom@codesourcery.com>

* tree-pretty-print (dump_generic_node): Test for NULL_TREE before
accessing TREE_TYPE.

From-SVN: r178103

gcc/ChangeLog
gcc/tree-pretty-print.c

index 471c9ee78921caaee1bcbfb099c4da862afef9fa..d96bf5ac65ae0b771a75cd4628279d05a6676585 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-26  Tom de Vries  <tom@codesourcery.com>
+
+       * tree-pretty-print (dump_generic_node): Test for NULL_TREE before
+       accessing TREE_TYPE.
+
 2011-08-26  Jiangning Liu  <jiangning.liu@arm.com>
 
        * config/arm/arm.md (*ior_scc_scc): Enable for Thumb2 as well.
index e24c7866208ff0831d2751946319bca0990eac93..2c4b5bf73950ae33c53ece0e139d84ee29ca9062 100644 (file)
@@ -820,6 +820,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
               infer them and MEM_ATTR caching will share MEM_REFs
               with differently-typed op0s.  */
            && TREE_CODE (TREE_OPERAND (node, 0)) != INTEGER_CST
+           /* Released SSA_NAMES have no TREE_TYPE.  */
+           && TREE_TYPE (TREE_OPERAND (node, 0)) != NULL_TREE
            /* Same pointer types, but ignoring POINTER_TYPE vs.
               REFERENCE_TYPE.  */
            && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (node, 0)))
@@ -1186,6 +1188,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
                     can't infer them and MEM_ATTR caching will share
                     MEM_REFs with differently-typed op0s.  */
                  && TREE_CODE (TREE_OPERAND (op0, 0)) != INTEGER_CST
+                 /* Released SSA_NAMES have no TREE_TYPE.  */
+                 && TREE_TYPE (TREE_OPERAND (op0, 0)) != NULL_TREE
                  /* Same pointer types, but ignoring POINTER_TYPE vs.
                     REFERENCE_TYPE.  */
                  && (TREE_TYPE (TREE_TYPE (TREE_OPERAND (op0, 0)))