This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Attachment: kinds.ChangeLog
Description: Binary data

Attachment: kinds.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]