summaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index d33d8315ada..2c9a8c8a2cb 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -419,7 +419,7 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
if (node == NULL_TREE)
return spc;
- is_expr = EXPR_P (node);
+ is_expr = EXPR_P (node) || GIMPLE_STMT_P (node);
/* We use has_stmt_ann because CALL_EXPR can be both an expression
and a statement, and we have no guarantee that it will have a
@@ -1024,12 +1024,15 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
break;
case MODIFY_EXPR:
+ case GIMPLE_MODIFY_STMT:
case INIT_EXPR:
- dump_generic_node (buffer, TREE_OPERAND (node, 0), spc, flags, false);
+ dump_generic_node (buffer, GENERIC_TREE_OPERAND (node, 0), spc, flags,
+ false);
pp_space (buffer);
pp_character (buffer, '=');
pp_space (buffer);
- dump_generic_node (buffer, TREE_OPERAND (node, 1), spc, flags, false);
+ dump_generic_node (buffer, GENERIC_TREE_OPERAND (node, 1), spc, flags,
+ false);
break;
case TARGET_EXPR:
@@ -1485,8 +1488,10 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
if (op0)
{
pp_space (buffer);
- if (TREE_CODE (op0) == MODIFY_EXPR)
- dump_generic_node (buffer, TREE_OPERAND (op0, 1), spc, flags, false);
+ if (TREE_CODE (op0) == MODIFY_EXPR
+ || TREE_CODE (op0) == GIMPLE_MODIFY_STMT)
+ dump_generic_node (buffer, GENERIC_TREE_OPERAND (op0, 1),
+ spc, flags, false);
else
dump_generic_node (buffer, op0, spc, flags, false);
}
@@ -2180,6 +2185,7 @@ op_prio (tree op)
return 1;
case MODIFY_EXPR:
+ case GIMPLE_MODIFY_STMT:
case INIT_EXPR:
return 2;
@@ -2311,6 +2317,7 @@ op_symbol_1 (enum tree_code code)
switch (code)
{
case MODIFY_EXPR:
+ case GIMPLE_MODIFY_STMT:
return "=";
case TRUTH_OR_EXPR: