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: [patch] fold-const.c: Don't handle ASSERT_EXPR.


Hi Diego,

> > 	PR tree-optimization/21047
> > 	* fold-const.c (fold): Don't handle ASSERT_EXPR.
> > 
> Fine with me.  This is a remnant from when I was adding
> ASSERT_EXPRs before going into SSA.  We now only add them when
> doing VRP and then the propagated ranges end up in the SSA names,
> so fold should never see ASSERT_EXPRs.
> 
> In fact, aborting on an ASSERT_EXPR wouldn't be a bad idea.

Thanks.  Then I am going to do this in one shot.  I am going to post a
patch to remove the handling of ASSERT_EXPR from fold *and* add to
fold_binary

  case ASSERT_EXPR:
    /* An ASSERT_EXPR should never be passed to fold_binary.  */
    gcc_unreachable ();

Kazu Hirata


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