print-tree.c (print_node): Only look at TREE_TYPE if TS_TYPED.
authorJason Merrill <jason@redhat.com>
Wed, 25 May 2011 19:52:18 +0000 (15:52 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 25 May 2011 19:52:18 +0000 (15:52 -0400)
* print-tree.c (print_node): Only look at TREE_TYPE if TS_TYPED.
* cp/ptree.c (cxx_print_xnode): Handle ARGUMENT_PACK_SELECT.

From-SVN: r174230

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/ptree.c
gcc/print-tree.c

index a1da8c1e927ce80d3c8e277b58b382f09daa4e60..da20d12827a4d0b264988b4181cad3fc2b99130f 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-25  Jason Merrill  <jason@redhat.com>
+
+       * print-tree.c (print_node): Only look at TREE_TYPE if TS_TYPED.
+
 2011-05-25  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/sse.md (*<sse>_maskcmp<mode>3_comm): New pattern.
index 204fea6e729273a64f2855acac2fb3de0ce9e08a..c0677ccf55d199bab5a55660fb2ee92b7ec42eb4 100644 (file)
@@ -1,5 +1,7 @@
 2011-05-25  Jason Merrill  <jason@redhat.com>
 
+       * ptree.c (cxx_print_xnode): Handle ARGUMENT_PACK_SELECT.
+
        PR c++/45698
        * pt.c (dependent_template_arg_p): See through ARGUMENT_PACK_SELECT.
 
index a4c3ed5ed0cfe9484e1d7d8ee8633c1609a91cb9..5c9626e768956b6f0c9854dbc6963ae564bd588a 100644 (file)
@@ -221,6 +221,12 @@ cxx_print_xnode (FILE *file, tree node, int indent)
          fprintf (file, "pending_template");
        }
       break;
+    case ARGUMENT_PACK_SELECT:
+      print_node (file, "pack", ARGUMENT_PACK_SELECT_FROM_PACK (node),
+                 indent+4);
+      indent_to (file, indent + 3);
+      fprintf (file, "index %d", ARGUMENT_PACK_SELECT_INDEX (node));
+      break;
     default:
       break;
     }
index 3b5edebed62d448fde73e0b5521e1bdbbbab66a9..58c96137934e61d64893df5fd6bf570a5da0d455 100644 (file)
@@ -321,7 +321,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
       if (indent <= 4)
        print_node_brief (file, "type", TREE_TYPE (node), indent + 4);
     }
-  else
+  else if (CODE_CONTAINS_STRUCT (code, TS_TYPED))
     {
       print_node (file, "type", TREE_TYPE (node), indent + 4);
       if (TREE_TYPE (node))