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. (take2)


On Tue, 2005-04-26 at 10:18 -0400, Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to remove the handling of ASSERT_EXPR from fold
> and abort on ASSERT_EXPR in fold_binary.
> 
> First, we never go into the switch statement shown in the patch if
> fold is passed expressions that satisfy IS_EXPR_CODE_CLASS.
> ASSERT_EXPR certainly satisfies IS_EXPR_CODE_CLASS.
> 
> Second, AFAICT, VRP never calls fold on ASSERT_EXPR.  It does call on
> ASSERT_EXPR_COND, but that's just a tcc_comparison, which fold handles
> fine via fold_binary.
> 
> Tested on i686-pc-linux-gnu.  OK to apply?
> 
> Kazu Hirata
> 
> 2005-04-26  Kazu Hirata  <kazu@cs.umass.edu>
> 
> 	PR tree-optimization/21047
> 	* fold-const.c (fold_binary): Abort on ASSERT_EXPR.
> 	(fold): Don't handle ASSERT_EXPR.
OK.
jeff



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