This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix real_maxval for IBM long double (PR target/36904)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: David Edelsohn <dje at gnu dot org>, Janis Johnson <janis187 at us dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 2 Sep 2008 17:36:06 +0930
- Subject: Re: [PATCH] Fix real_maxval for IBM long double (PR target/36904)
- References: <20080901182013.GP32376@hs20-bc2-1.build.redhat.com>
On Mon, Sep 01, 2008 at 02:20:13PM -0400, Jakub Jelinek wrote:
> --- gcc/real.c.jj 2008-08-19 14:20:31.000000000 +0200
> +++ gcc/real.c 2008-09-01 19:15:51.000000000 +0200
> @@ -2417,7 +2417,7 @@ real_maxval (REAL_VALUE_TYPE *r, int sig
> required to be the value of the long double rounded to the
> nearest double. Rounding means we need a slightly smaller
> value for LDBL_MAX. */
> - clear_significand_bit (r, SIGNIFICAND_BITS - fmt->pnan);
> + clear_significand_bit (r, SIGNIFICAND_BITS - fmt->pnan - 1);
> }
> }
This looks good to me. If I can count bits properly, it is even the
correct bit. :)
--
Alan Modra
Australia Development Lab, IBM