public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, libgfortran] Bug 65541 - [5 Regression] namelist regression
@ 2015-03-26  2:50 Jerry DeLisle
  0 siblings, 0 replies; only message in thread
From: Jerry DeLisle @ 2015-03-26  2:50 UTC (permalink / raw)
  To: gfortran; +Cc: gcc patches

Committed as obvious and simple.

revision 221682.

Regards,

Jerry

2015-03-25 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/65541
	* io/write.c (nml_write_obj): Convert '+' to '%' before emitting
	object names in namelists.

Index: io/write.c
===================================================================
--- io/write.c	(revision 221681)
+++ io/write.c	(working copy)
@@ -1704,10 +1704,11 @@
    size_t clen;
    index_type elem_ctr;
    size_t obj_name_len;
-  void * p ;
+  void * p;
    char cup;
    char * obj_name;
    char * ext_name;
+  char * q;
    size_t ext_name_len;
    char rep_buff[NML_DIGITS];
    namelist_info * cmp;
@@ -1745,6 +1746,8 @@
        for (dim_i = len; dim_i < clen; dim_i++)
  	{
  	  cup = toupper ((int) obj->var_name[dim_i]);
+	  if (cup == '+')
+	    cup = '%';
  	  write_character (dtp, &cup, 1, 1, NODELIM);
  	}
        write_character (dtp, "=", 1, 1, NODELIM);
@@ -1894,6 +1897,9 @@
  		}

  	      ext_name[tot_len] = '\0';
+	      for (q = ext_name; *q; q++)
+		if (*q == '+')
+		  *q = '%';

  	      /* Now obj_name.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-26  2:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26  2:50 [patch, libgfortran] Bug 65541 - [5 Regression] namelist regression Jerry DeLisle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).