This is the mail archive of the 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]

Re: [patch,fortran] Fix PR19310 unnecessary error for overflowing results

Paul Brook wrote:
Jerry would place his disabling of range checking above this
block.  However, we probably want to explicit set overflow
values to Inf, so the checking should look like

if (mpfr_sgn (q) == 0) retval = ARITH_OK; else if (mpfr_cmp (q, gfc_real_kinds[i].huge) > 0) { if (disable-checking) { set x to inf with the proper sign retval = ARITH_OK; } else retval = ARITH_OVERFLOW; } else if (mpfr_cmp (q, gfc_real_kinds[i].subnormal) < 0) retval = ARITH_UNDERFLOW; else if (mpfr_cmp (q, gfc_real_kinds[i].tiny) < 0)

Yes. This is what I meant.


Having read all your comments, I understand. Please forgive me for not having much depth here. Of course the labor is cheap. :)

I did a search for that REAL_VALUE_NEGATE and did not find it, but that was about 1:00 AM this morning and when I tried to use it I had a type error. Doh! I just fixed that and it works fine. (real.h is already included where it needs to be)

I can incorporate your comments and I very much appreciate the reviews. I will give this another go around and resubmit.



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