This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/73142] Reading a namelist fails - my code worked until 4.8.2


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=73142

--- Comment #7 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I have confirmed this is a duplicate of 71123.  The fix is trivial.

--- trunk/libgfortran/io/list_read.c    2016/05/24 04:15:39     236627
+++ trunk/libgfortran/io/list_read.c    2016/05/24 06:11:21     236628
@@ -418,7 +418,7 @@
   /* Now skip spaces, EOF and EOL are handled in next_char.  */
   do
     c = next_char (dtp);
-  while (c != EOF && (c == ' ' || c == '\t'));
+  while (c != EOF && (c == ' ' || c == '\r' || c == '\t'));

   unget_char (dtp, c);
   return c;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]