This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix PR22135
- From: Ira Rosen <IRAR at il dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Jun 2005 14:36:27 +0300
- Subject: [patch] Fix PR22135
- Reply-to:
- Sensitivity:
After the patch http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02817.html
stmt_ann can return TRUE for phi nodes (since 'aux' field was moved to
'tree_ann_common_d' and it is now used for phis). The problem occurred in
attempt to iterate through virtual operands of phi in order to dump them in
function dump_vops. I added a check for the node not being a phi node
before calling dump_vops for it, since the existing checks are not enough
now.
Bootstrapped and tested on ppc-darwin.
O.K. for mainline?
Thanks,
Ira
ChangeLog Entry:
* tree-pretty-print.c (dump_generic_node): Check that the node is not
a phi node before calling dump_vops.
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 2.65
diff -c -3 -p -r2.65 tree-pretty-print.c
*** tree-pretty-print.c 25 Jun 2005 02:01:30 -0000 2.65
--- tree-pretty-print.c 30 Jun 2005 08:40:56 -0000
*************** dump_generic_node (pretty_printer *buffe
*** 267,273 ****
if (TREE_CODE (node) != ERROR_MARK
&& is_gimple_stmt (node)
&& (flags & TDF_VOPS)
! && stmt_ann (node))
dump_vops (buffer, node, spc, flags);
if (is_stmt && (flags & TDF_STMTADDR))
--- 267,274 ----
if (TREE_CODE (node) != ERROR_MARK
&& is_gimple_stmt (node)
&& (flags & TDF_VOPS)
! && stmt_ann (node)
! && TREE_CODE (node) != PHI_NODE)
dump_vops (buffer, node, spc, flags);
if (is_stmt && (flags & TDF_STMTADDR))