This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix for LT comparison
- To: law at cygnus dot com
- Subject: Re: fix for LT comparison
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Mon, 17 Jul 2000 01:38:51 -0700
- CC: gcc-patches at gcc dot gnu dot org
- References: <9534.963817238@upchuck>
> Date: Mon, 17 Jul 2000 01:00:38 -0600
> From: Jeffrey A Law <law@cygnus.com>
> > 2000-07-08 Geoffrey Keating <geoffk@cygnus.com>
> >
> > * simplify-rtx.c (simplify_relational_operation): Two signed
> > values with equal high words are less/greater than each other if
> > their low words are less/greater when considered as unsigned.
> This is fine. Please install this patch.
>
> Did you happen to have a testcase for this patch that could be included
> in the testsuite? If so, could you please make one?
OK, I'll add the following as 20000717-2.c:
static void
compare (long long foo)
{
if (foo < 4294967297LL)
abort();
}
int main(void)
{
compare (8589934591LL);
exit (0);
}
It fails with -O3 on a gcc without the patch and works with it.
--
- Geoffrey Keating <geoffk@cygnus.com>