diff mbox

PATCH to print_node to avoid ICE on TREE_VEC

Message ID 5038385F.8040407@redhat.com
State New
Headers show

Commit Message

Jason Merrill Aug. 25, 2012, 2:28 a.m. UTC
Now that TREE_LANG_FLAG_0 doesn't work for TREE_VEC, we shouldn't try to 
use it.

Tested x86_64-pc-linux-gnu, applying to trunk as obvious.
diff mbox

Patch

commit 3a2398e3485f19d74cd9ea74301ef9da62680be8
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Aug 24 16:37:51 2012 -0400

    	* print-tree.c (print_node): Don't check TREE_LANG_FLAG_*
    	on TREE_VEC or SSA_NAME.

diff --git a/gcc/print-tree.c b/gcc/print-tree.c
index d40fb08..27fb72f 100644
--- a/gcc/print-tree.c
+++ b/gcc/print-tree.c
@@ -363,20 +363,24 @@  print_node (FILE *file, const char *prefix, tree node, int indent)
     fputs (" deprecated", file);
   if (TREE_VISITED (node))
     fputs (" visited", file);
-  if (TREE_LANG_FLAG_0 (node))
-    fputs (" tree_0", file);
-  if (TREE_LANG_FLAG_1 (node))
-    fputs (" tree_1", file);
-  if (TREE_LANG_FLAG_2 (node))
-    fputs (" tree_2", file);
-  if (TREE_LANG_FLAG_3 (node))
-    fputs (" tree_3", file);
-  if (TREE_LANG_FLAG_4 (node))
-    fputs (" tree_4", file);
-  if (TREE_LANG_FLAG_5 (node))
-    fputs (" tree_5", file);
-  if (TREE_LANG_FLAG_6 (node))
-    fputs (" tree_6", file);
+
+  if (code != TREE_VEC && code != SSA_NAME)
+    {
+      if (TREE_LANG_FLAG_0 (node))
+	fputs (" tree_0", file);
+      if (TREE_LANG_FLAG_1 (node))
+	fputs (" tree_1", file);
+      if (TREE_LANG_FLAG_2 (node))
+	fputs (" tree_2", file);
+      if (TREE_LANG_FLAG_3 (node))
+	fputs (" tree_3", file);
+      if (TREE_LANG_FLAG_4 (node))
+	fputs (" tree_4", file);
+      if (TREE_LANG_FLAG_5 (node))
+	fputs (" tree_5", file);
+      if (TREE_LANG_FLAG_6 (node))
+	fputs (" tree_6", file);
+    }
 
   /* DECL_ nodes have additional attributes.  */