[PATCH] Fix PR 17195

Paul Brook paul@codesourcery.com
Sat Aug 28 15:29:00 GMT 2004


On Saturday 28 August 2004 16:22, Steve Kargl wrote:
> On Sat, Aug 28, 2004 at 03:01:16PM +0100, Paul Brook wrote:
> > On Thursday 26 August 2004 21:07, Steve Kargl wrote:
> > > The attached patch hacks around a corner case
> > > in writing out floating point numbers.  This
> > > program
> > >
> > >     real(8) x
> > >     print*. huge(x)
> > >     end
> > >
> > > will enter an infinite loop.
> > >
> > > 2004-08-24  Steven G. Kargl  <kargls@comcast.net>
> > >
> > >         PR fortran/17195
> > >         * io/write.c (output_float): Avoid corner case "print *,
> > > huge(1e0_8)"
> >
> > I'm currently rewriting output_float for other reasons.I'll make sure
> > this is fixed one way or another.
>
> Does your rewrite have anything to do with REAL*16?  :-)

No. The existing routine only works by chance most of the time, and is plain 
broken the rest of the time. It also rounds values incorrectly.

Having said that, my rewrite probably does make real*16 much easier to 
implement.

Paul



More information about the Fortran mailing list