[gfortran] patch PR libfortran/19155

Steven Bosscher stevenb@suse.de
Mon May 9 10:14:00 GMT 2005


On Monday 09 May 2005 11:42, François-Xavier Coudert wrote:
> I propose this patch to fix PR libfortran/19115. With this patch, the I/O
> library accepts 'E+00' as a valid real number (with value 0.0). The
> standard says it is not a valid real number, but doesn't require an error.
>
> Reasons for this choice: g77 accepts it, as well as numerous other Fortran
> compilers (Intel, Portland, Sun, IBM). It is even part of the NIST
> testsuite (one of the last NIST failures for gfortran).

> @@ -538,7 +538,8 @@ read_f (fnode * f, char *dest, int lengt
>  
>    /* A digit (or a '.') is required at this point */
>  
> -  if (!isdigit (*p) && *p != '.')
> +  if (!isdigit (*p) && *p != '.' && *p != 'd' && *p != 'D'
> +      && *p != 'e' && *p != 'E')
>      goto bad_float;
>  
>    /* Remember the position of the first digit.  */

That "A digit ..." comment needs updating with this patch.

Looks good enough otherwise :-)  Thanks.

Gr.
Steven




More information about the Fortran mailing list