misuse of TRULY_NOOP_TRUNCTION in expr.c

Jeffrey A Law law@cygnus.com
Tue Aug 24 01:48:00 GMT 1999


  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



More information about the Gcc-patches mailing list