This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: misuse of TRULY_NOOP_TRUNCTION in expr.c
- To: goodwin at tensilica dot com
- Subject: Re: misuse of TRULY_NOOP_TRUNCTION in expr.c
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 24 Aug 1999 02:47:39 -0600
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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