This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Optimisation prevents overflow?
- From: Daniel Franke <franke dot daniel at gmail dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Brooks Moses <bmoses at stanford dot edu>, Davide Mancusi <arekfu at yahoo dot it>
- Date: Thu, 19 Jul 2007 23:49:56 +0200
- Subject: Re: Optimisation prevents overflow?
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=oTuikugMgQltYRUcdTtJpKVjLJGn0I6X5hZtFG/RWWJyfCAXYenU38vkBAdjeRCo1nFk0u+bFFMsAVIbuzMuAe5akqQj0XxCtnmUxl08CH7RBmMNANbHuHrp30ci7ITgYvtCoW+ex5YV23Iio4L4/agsvIt8sGvmAb5xdAgq/nc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=VeXNWBKv4h85GB5RMk0OxVqOp5BeRM+VRxMsqZjk3/E5C7EJyppjdh8tBe56zzL/Hunj9HW0dE7RlpNlmTv1CnRkMgryWXGD989s0C45GBQW0DPoex7WSpj/dhohWFb2Vr1gD/MkDGJw53DUcl4UC5U9YRIx45hMVIstSdo0hy4=
- References: <469FD202.7080407@yahoo.it> <200707192335.15396.franke.daniel@gmail.com> <20070719144206.D13825@droplet.stanford.edu>
On Thursday 19 July 2007 23:42:06 Brooks Moses wrote:
> On Thu, Jul 19, 2007 at 11:35:15PM +0200, Daniel Franke wrote:
> > On Thursday 19 July 2007 23:05:06 Davide Mancusi wrote:
> > > Is optimisation preventing overflow? What is really happening here?
> >
> > In other mail:
> > > ...and yes, -ffloat-store fixes it. What does it do? I could not find
> > > documentation about it.
> >
> > I'd guess, that's the (in)famous extended precision, 80 vs. 64 bits
> > (iirc).
>
> Yeah, I thought so at first, but those both have the same exponent range
> IIRC, and certainly not enough to get up to an erroneous answer of 273
> instead of 18 before it overflows.
As both, -ffloat-store and the external function (a CONTAINed function doesn't
work, inlining?) give consistent results, I'd assume that it's the right
ballpark, at least. It also hints that the usage of PRINT in the first loop
has the same effect?!