re PR libfortran/33253 (namelist: reading back a string with apostrophe)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 3 Oct 2007 00:33:09 +0000 (00:33 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Wed, 3 Oct 2007 00:33:09 +0000 (00:33 +0000)
2007-10-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

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

From-SVN: r128973

libgfortran/ChangeLog
libgfortran/io/list_read.c

index 7392997e2af839adbba3c353deab7b88f39fd9df..a249ded5f902c0e944b94b272ee122be85658e8d 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/33253
+       * io/list_read.c (read_character): Use DELIM_APOSTROPHE and DELIM_QUOTE
+        and quote value in check of first character in string.
+
 2007-10-02  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
 
        PR fortran/33469
index 0eb1845849d627f9e1b05eed4b74dfd14b86f85d..42c534a1c2f6c885f975eed88a87c7cbe00d9b3b 100644 (file)
@@ -893,7 +893,10 @@ 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
+             || quote == ' '))
        {
          unget_char (dtp,c);
          return;