This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [libgfortran,patch] Changes to mk-kinds-h.sh
- From: "François-Xavier Coudert" <fxcoudert at gmail dot com>
- To: "Fortran List" <fortran at gcc dot gnu dot org>, "gcc-patches list" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 17 Oct 2007 10:15:57 +0100
- Subject: Re: [libgfortran,patch] Changes to mk-kinds-h.sh
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=zTDZud9BkTdeSMVzELBUE5J8Xi0OQO+EbeqpxdsIs3I=; b=Hp3pD2G5/TJh25YzTU1GkTml7UhyyUoe6aDC3/eGG36FS8PwOGqpWgfrLRm+aNXEZ9XrUC1OGbdSDfdO2NYN/wofrI6QDASeWhaQwFqeG+WlHxXFmpZWh7ZAM/e2M0h5IFPLRrQhZpA1OREv1k31X0V/ebPY42xdNbUMSWLf8ks=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=J3B4lzLwmLTOHi4a37ZvgcxzCynM1QFyWrv4hBUJbDbpzQx4ng68whw2CLyRHuaqoTvMcNrmc5E+Udzw310W2AxJ4gXp+r/+wmrm/OmJ3X9J8pUztjnnxXONtfZqEVZQCUbKu/CUc5Syz662nkYb2f191aYM87yPjFY5E2LOB5k=
- References: <E3FE7A46-D579-4574-BC71-CE4CF580E349@gmail.com>
ping
[http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00515.html]
On 10/9/07, FX Coudert <fxcoudert@gmail.com> wrote:
> After some time working on real(kind=16), I realized that on PowerPC
> and MIPS, it so happens that HUGE(0._16) is not equal to LDBL_MAX.
> (See http://gcc.gnu.org/ml/fortran/2007-09/msg00466.html for
> details.) libgfortran currently use LDBL_MAX, leading to wrong code
> for {MAX,MIN}{VAL,LOC} intrinsics.
>
> This patch fixes this by moving the definitions GFC_REAL_*_HUGE from
> libgfortran.h to the generated kinds.h header file. I do this by
> compiling a testcase with HUGE(0._${kind}), using -fdump-parse-tree
> and scanning the output.
>
> I also moved GFC_REAL_*_DIGITS and GFC_REAL_*_RADIX there, ad removed
> GFC_REAL_LARGEST_FORMAT and GFC_REAL_LARGEST which aren't used any
> more since Jerry's "per-kind I/O" patch.
>
> Bootstrapped and regtested on x86_64-linux; regtesting did raise a
> few ICEs, obviously not related to the library change (I also
> regtested an unrelated front-end patch at that time), but I'll make
> sure to do a clean testing before I commit. OK to commit?
>
> FX