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]

Re: [tree-ssa]: PRE updates and note on bug


On Tue, 2003-07-22 at 14:19, Daniel Berlin wrote:
> 
> > As I said, it could be the reverse iterators.
> > If the end of the bb is an empty statement, bsi = bsi_last (bb); 
> > bsi_prev (bsi), doesn't work.
> 
> As an FYI, the reason it doesn't work is because of bsi_last:
> 
>   /* If the last stmt pointer isn't something a BSI can represent (ie, an
>       empty statement node), then find the last stmt the slow way.  */
>    if (b.tp == NULL)
>      {
> 
> 
> This condition is wrong for the comment.
> If BSI's can't represent empty statement nodes, it needs to check
> at least
> 1. IS_EMPTY_STMT (*b.tp)
> and I believe
> 2. If *b.tp == COMPOUND_EXPR, IS_EMPTY_STMT (the first operand).
> 
b = bsi_init (bb->end_tree_p, bb);

The call to bsi_init() above it ought to be setting b.tp to NULL if it
can't be represented by a BSI node. (like an empty stmt node of a
BIND_EXPR or whetever). The NULL condition means it cant be
represented...

Andrew


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