Hi,

The attached patch fixes this problem by not calling hit_eof if EOF can be a
valid separator.

Regression tested on x86-64.

OK for trunk with test case from PR?

Regards,

Jerry

2012-12-27  Jerry DeLisle  <jvdeli...@gcc.gnu.org>

        PR libfortran/55818
        * io/list_read.c (read_real): Do not call hit_eof when EOF can be
        treated as a value separator



Index: list_read.c
===================================================================
--- list_read.c	(revision 194731)
+++ list_read.c	(working copy)
@@ -1429,6 +1429,7 @@ read_real (st_parameter_dt *dtp, void * dest, int
       goto got_sign;
 
     CASE_SEPARATORS:
+    case EOF:
       unget_char (dtp, c);		/* Single null.  */
       eat_separator (dtp);
       return;
@@ -1484,6 +1485,7 @@ read_real (st_parameter_dt *dtp, void * dest, int
 	  goto got_repeat;
 
 	CASE_SEPARATORS:
+	case EOF:
           if (c != '\n' && c != ',' && c != '\r' && c != ';')
 	    unget_char (dtp, c);
 	  goto done;

Reply via email to