This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp] dump decl_value_expr
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Oct 2005 14:11:21 -0800
- Subject: [gomp] dump decl_value_expr
* tree-pretty-print.c (print_declaration): Dump DECL_VALUE_EXPR.
* print-tree.c (print_node): Likewise.
Index: gcc/tree-pretty-print.c
===================================================================
--- gcc/tree-pretty-print.c (revision 106281)
+++ gcc/tree-pretty-print.c (working copy)
@@ -1861,6 +1861,13 @@ print_declaration (pretty_printer *buffe
}
}
+ if (TREE_CODE (t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (t))
+ {
+ pp_string (buffer, " [value-expr: ");
+ dump_generic_node (buffer, DECL_VALUE_EXPR (t), spc, flags, false);
+ pp_character (buffer, ']');
+ }
+
pp_character (buffer, ';');
}
Index: gcc/print-tree.c
===================================================================
--- gcc/print-tree.c (revision 106281)
+++ gcc/print-tree.c (working copy)
@@ -496,6 +496,10 @@ print_node (FILE *file, const char *pref
(void *) DECL_STRUCT_FUNCTION (node));
}
+ if ((TREE_CODE (node) == VAR_DECL || TREE_CODE (node) == PARM_DECL)
+ && DECL_HAS_VALUE_EXPR_P (node))
+ print_node (file, "value-expr", DECL_VALUE_EXPR (node), indent + 4);
+
/* Print the decl chain only if decl is at second level. */
if (indent == 4)
print_node (file, "chain", TREE_CHAIN (node), indent + 4);