]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/53541 (gcc-4.6.2 segfaults on dumping tree information)
authorRichard Guenther <rguenther@suse.de>
Thu, 31 May 2012 15:03:37 +0000 (15:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 31 May 2012 15:03:37 +0000 (15:03 +0000)
2012-05-31  Richard Guenther  <rguenther@suse.de>

PR middle-end/53541
* tree-pretty-print.c (dump_generic_node): Guard against
NULL_TREE TREE_TYPE when dumping MEM_REF offset type.

From-SVN: r188066

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

index 9be8483f8ca3320c9464faa9ad8370e5cf772321..24a9a04c42cfbe9e1b02856e119b816095714877 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-31  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/53541
+       * tree-pretty-print.c (dump_generic_node): Guard against
+       NULL_TREE TREE_TYPE when dumping MEM_REF offset type.
+
 2012-05-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        Backport from mainline
index 12ef38817eb9d00be758fbdefab01490346bb596..b9e39af9159820c5086259596a09e5c5556f748b 100644 (file)
@@ -805,6 +805,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)))
@@ -1171,6 +1173,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)))