(print_node): Don't print blank line for null fields in a TREE_VEC.
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 16 Sep 1992 01:13:47 +0000 (18:13 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 16 Sep 1992 01:13:47 +0000 (18:13 -0700)
From-SVN: r2133

gcc/print-tree.c

index 6b045b59121b848bddcbf495ff0f15b2ffeed4c2..648dace760aacae83d93199b2c46ca54d93e3592 100644 (file)
@@ -601,12 +601,13 @@ print_node (file, prefix, node, indent)
        case TREE_VEC:
          len = TREE_VEC_LENGTH (node);
          for (i = 0; i < len; i++)
-           {
-             char temp[10];
-             sprintf (temp, "elt %d", i);
-             indent_to (file, indent + 4);
-             print_node_brief (file, temp, TREE_VEC_ELT (node, i), 0);
-           }
+           if (TREE_VEC_ELT (node, i))
+             {
+               char temp[10];
+               sprintf (temp, "elt %d", i);
+               indent_to (file, indent + 4);
+               print_node_brief (file, temp, TREE_VEC_ELT (node, i), 0);
+             }
          break;
 
        case OP_IDENTIFIER: