[fixed-point] Patch to fix a bug in comptypes_internal
Fu, Chao-Ying
fu@mips.com
Fri Mar 16 22:46:00 GMT 2007
Hello,
Here is a patch to fix a bug in comptype_internal.
We should not allow saturating and non-saturating types compatible
in comptypes_internal. This bug causes fold_binary to use non-saturating operators
in some cases.
I add a check in fold_binary to assert if saturating info doesn't
agree between type and arg0 before calling const_binop.
Thanks!
Regards,
Chao-ying
2007-03-16 Chao-ying Fu <fu@mips.com>
* c-typeck.c (comptypes_internal): We should not allow saturating
and non-saturating fixed-point types compatible.
* tree-pretty-print.c (dump_generic_node): Support FIXED_CONVERT_EXPR.
* fold-const.c (fold_binary): Check if TYPE_SATURATING is consistent.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc.diff
Type: application/octet-stream
Size: 1722 bytes
Desc: gcc.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070316/43900eae/attachment.obj>
More information about the Gcc-patches
mailing list