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]: add missing FIX_ROUND_EXPR case


I noticed this when looking at something else, downstream in
fold_convert_const_int_from_real() we handle FIX_ROUND_EXPR, so we
should pass it along upstream in fold_unary_to_constant().

Bootstrapped on x86_64-unknown-linux-gnu, no regressions.

Ok for mainline?

		Thanks,
		--Kaveh


2005-03-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* fold-const.c (fold_unary_to_constant): Add FIX_ROUND_EXPR case.

diff -rcp orig/egcc-CVS20050308/gcc/fold-const.c egcc-CVS20050308/gcc/fold-const.c
*** orig/egcc-CVS20050308/gcc/fold-const.c	Tue Mar  8 21:24:38 2005
--- egcc-CVS20050308/gcc/fold-const.c	Tue Mar  8 21:37:30 2005
*************** fold_unary_to_constant (enum tree_code c
*** 11126,11131 ****
--- 11126,11132 ----
      case FIX_TRUNC_EXPR:
      case FIX_FLOOR_EXPR:
      case FIX_CEIL_EXPR:
+     case FIX_ROUND_EXPR:
        return fold_convert_const (code, type, op0);
  
      case NEGATE_EXPR:


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