[fixed-point] Patch to round toward zero

Fu, Chao-Ying fu@mips.com
Thu Mar 22 00:19:00 GMT 2007


Hi,

  This patch fixes a bug for conversions from negative fixed-point numbers
to integers.  A test is updated to include this case.  Thanks!

Regards,
Chao-ying

ChangeLog
2007-03-21  Chao-ying Fu  <fu@mips.com>

	* config/fixed-bit.c (FIXED_ALL, FIXED_UINT): From fixed-point to
	integers, we need to check for negative fixed-point numbers to round
	toward zero.

testsuite/ChangeLog
2007-03-21  Chao-ying Fu  <fu@mips.com>

	* gcc.dg/fixed-ponit/convert.c: Add tests for conversions from
	negative fixed-point numbers to integers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc.diff
Type: application/octet-stream
Size: 3601 bytes
Desc: gcc.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070322/4e5cc282/attachment.obj>


More information about the Gcc-patches mailing list