On Tue, 2014-04-22 at 11:37 -0400, Trevor Saunders wrote:
> > diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
> > index 902b879..62ec9f5 100644
> > --- a/gcc/tree-vrp.c
> > +++ b/gcc/tree-vrp.c
> > @@ -9517,10 +9517,11 @@ fold_predicate_in (gimple_stmt_iterator *si)
> >        else
> >     {
> >       gcc_assert (gimple_code (stmt) == GIMPLE_COND);
> > +     gimple_cond cond_stmt = stmt->as_a_gimple_cond ();
> 
> the assert isn't needed now right?

Correct.  I guess my thinking here was that the original code was
checking for it, presumably to fail early, rather than hitting the
GIMPLE_CHECK macros when calling the accessors later on, but the checked
cast to gimple_cond gives us that.

Reply via email to