This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: arithmetic underflow
On Fri, Mar 25, 2005 at 07:27:52PM +0100, Tobias Schl?ter wrote:
> Paul Brook wrote:
> > I can't reproduce this on i686-linux. This error was turned into a warning
> > quite some time ago, and can be disabled with -Wno-underflow.
>
> I found the bug which turned made this warning back into an error. It's in a
> patch that I approved :-(
>
> check_result()'s body looks like this:
> if (rc != ARITH_OK)
> gfc_free_expr (r);
> else
> {
> if (rc == ARITH_UNDERFLOW && gfc_option.warn_underflow)
> gfc_warning ("%s at %L", gfc_arith_error (rc), &x->where);
>
> if (rc == ARITH_ASYMMETRIC)
> gfc_warning ("%s at %L", gfc_arith_error (rc), &x->where);
>
> rc = ARITH_OK;
> *rp = r;
> }
> return rc;
>
> Of course the condition in the if for ARITH_UNDERFLOW can never be true, and
> the same goes for ARITH_ASYMMETRIC. Steve, do you have time to fix this?
> Otherwise I'll do this.
>
I'll look at it tomorrow. In looking at the function, I
don't know what I was thinking at the time.
--
Steve