This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix fold-const comparisons with 0x7fffffffU
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: [PATCH] Fix fold-const comparisons with 0x7fffffffU
- From: Richard Henderson <rth at redhat dot com>
- Date: Sun, 1 Apr 2001 22:32:17 -0700
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu, gcc-patches at gcc dot gnu dot org
- References: <20010329234930.B557@sunsite.ms.mff.cuni.cz>
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~