[patch, libfortran] PR38772 r143102 reveals missed error checking on floating point reads

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Jan 13 07:57:00 GMT 2009


OK, Jerry - it looks good to me.

Thanks for the patch.

Paul

On Tue, Jan 13, 2009 at 6:55 AM,  <jvdelisle@verizon.net> wrote:
> Since this bug does cause a regression in xplor-nih and the patch is simple
> and obvious, I plan to commit this to trunk.
>
> Turns out the problem is a regression of sorts relative to 4.3.  The error
> was introduced by myself 8 weeks ago with r140684
>
> Regression tested on x86-64-gnu-linux. NIST tested
>
> I will convert Jacks test case given in the PR for the test suite.
>
> Regards,
>
> Jerry
>
> 2009-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
>
>        PR libfortran/38772
>        * io/read.c (read_f): Clean up loop conditions for BZ/BN,
>        allowing proper digit testing. White space fix.
>
> Index: read.c
> ===================================================================
> --- read.c      (revision 143139)
> +++ read.c      (working copy)
> @@ -972,14 +972,14 @@ read_f (st_parameter_dt *dtp, const fnod
>       while (w > 0)
>         {
>           if (*p != ' ')
> -         goto bad_float;
> +           goto bad_float;
>           p++;
>           w--;
>         }
>     }
>   else  /* BZ or BN status is enabled */
>     {
> -      while (w > 0 && (isdigit (*p) || *p == ' '))
> +      while (w > 0)
>         {
>           if (*p == ' ')
>             {
>
>
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Fortran mailing list