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]

Re: misuse of TRULY_NOOP_TRUNCTION in expr.c


  In message <14260.20237.802115.151011@spleen.ma.tensilica.com>you write:
  > 
  > >From todays cvs sources in expr.c line 1024:
  > 
  > 	  /* Search for a mode to convert via.  */
  > 	  for (intermediate = from_mode; intermediate != VOIDmode;
  > 	       intermediate = GET_MODE_WIDER_MODE (intermediate))
  > 	    if (((can_extend_p (to_mode, intermediate, unsignedp)
  > 		  != CODE_FOR_nothing)
  > 		 || (GET_MODE_SIZE (to_mode) < GET_MODE_SIZE (intermediate)
  > 		     && TRULY_NOOP_TRUNCATION (to_mode, intermediate)))
  > 		&& (can_extend_p (intermediate, from_mode, unsignedp)
  > 		    != CODE_FOR_nothing))
  > 	      {
  > 		convert_move (to, convert_to_mode (intermediate, from,
  > 						   unsignedp), unsignedp);
  > 		return;
  > 	      }
  > 
  > 
  > TRULY_NOOP_TRUNCATION should take two mode *sizes* (in bits), but
  > to_mode and intermediate are modes. So the use should be:
  > 
  > TRUELY_NOOP_TRUNCATION(GET_MODE_BITSIZE(to_mode),
  >                        GET_MODE_BITSIZE(intermediate))
Yup. Thanks for pointing that out.  I've just installed the obvious fix for
this bug.
jeff


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