misuse of TRULY_NOOP_TRUNCTION in expr.c
David Goodwin
goodwin@tensilica.com
Fri Aug 13 10:00:00 GMT 1999
>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))
- David
goodwin@tensilica.com
More information about the Gcc-bugs
mailing list