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

jvdelisle@verizon.net jvdelisle@verizon.net
Tue Jan 13 06:18:00 GMT 2009


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 == ' ')
              {




More information about the Fortran mailing list