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]

Re: [PATCH] Fix fold-const comparisons with 0x7fffffffU


On Thu, Mar 29, 2001 at 11:49:30PM +0200, Jakub Jelinek wrote:
> 	* fold-const.c (fold): Before optimizing unsigned comparison with
> 	0x7fffffffU, make sure arg0 is integral type.

Ok.

> 	* gcc.c-torture/execute/20010329-1.c: New test.

Try constructing the constants with (unsigned)INT_MAX + 2 and
(unsigned long)LONG_MAX + 2 and choose which comparison to test
via sizeof.


r~


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