[libgfortran,patch] Changes to mk-kinds-h.sh

François-Xavier Coudert fxcoudert@gmail.com
Wed Oct 17 09:46:00 GMT 2007


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



More information about the Gcc-patches mailing list