re PR libfortran/33253 (namelist: reading back a string with apostrophe)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 3 Sep 2007 19:29:17 +0000 (19:29 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Mon, 3 Sep 2007 19:29:17 +0000 (19:29 +0000)
2007-09-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libfortran/33253
* io/list_read.c (read_character): Use DELIM_APOSTROPHE and DELIM_QUOTE
in check of first character in string.

From-SVN: r128057

libgfortran/ChangeLog
libgfortran/io/list_read.c

index 5c02df9b679ed141880751b3d6c8a609a10eb963..806d89bda2f45d23ac2d3719496e504ca36ac227 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/33253
+       * io/list_read.c (read_character): Use DELIM_APOSTROPHE and DELIM_QUOTE
+       in check of first character in string. 
+
 2007-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR fortran/31675
index b97130b77080f1f855cd5416f02c861356d71e07..0b4b8456996d9bc3c36dbea595648c9a8edfaf41 100644 (file)
@@ -887,7 +887,9 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused)))
       goto get_string;
 
     default:
-      if (dtp->u.p.namelist_mode)
+      if (dtp->u.p.namelist_mode
+         && (dtp->u.p.current_unit->flags.delim == DELIM_APOSTROPHE
+             || dtp->u.p.current_unit->flags.delim == DELIM_QUOTE))
        {
          unget_char (dtp,c);
          return;