This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[fixed-point] Patch to fix a bug in comptypes_internal


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.

Attachment: gcc.diff
Description: gcc.diff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]