This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] patch for pr12839 / F2003 format of Inf and NaN
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Bud Davis <bdavis9659 at comcast dot net>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Jun 2004 13:14:29 +0100
- Subject: Re: [gfortran] patch for pr12839 / F2003 format of Inf and NaN
- Organization: CodeSourcery
- References: <1086567830.31849.8.camel@localhost.localdomain>
> Change Log:
>
> 2004-06-06 Bud Davis <bdavis9659@comcast.net>
>
> PR gfortran/12839
> * format.c (write_float): format inf and nan IAW F2003
Ok. (the version that uses memcpy)
Don't forget the changelog entry for the testcase.
> !pr 12839- F2003 formatting of Inf /Nan
> implicit none
> character*40 l
> character*12 fmt
> logical debug
> data debug /.FALSE./
I'd prefer it if the debug code were removed. It makes a significant
difference to the compile time for the test (~50% slower).
> real zero, pos_inf, neg_inf, nan
> zero = 0.0
> pos_inf = 1.0/zero
> neg_inf = -1.0/zero
> nan = zero/zero
We need a better way of generating inf/nan. We don't currently have one, so
please add a comment to that effect.
Paul