This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: Optimisation prevents overflow?


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?!


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