[Bug fortran/55818] Reading a REAL from a file which doesn't end in a new line fails
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 28 01:05:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55818
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2012-12-28 01:05:18 UTC ---
Possible patch, testing.
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;
More information about the Gcc-bugs
mailing list