This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix PR22135





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))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]