diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2015-03-26 02:44:34 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2015-03-26 02:44:34 +0000 |
commit | 9c5b1bf7953f9717943e40241be26cfc2422cd04 (patch) | |
tree | bebd3a1da076710fc25d4ecd57793eb63a1ed42f | |
parent | d94a1e7fe932238f9073bcbfb2821a264d9f6ac6 (diff) | |
download | gcc-9c5b1bf7953f9717943e40241be26cfc2422cd04.zip gcc-9c5b1bf7953f9717943e40241be26cfc2422cd04.tar.gz gcc-9c5b1bf7953f9717943e40241be26cfc2422cd04.tar.bz2 |
re PR fortran/65541 (namelist regression)
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.
From-SVN: r221682
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/write.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index d66fc4b..c96826a 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +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. + 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/59513 diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 3e890b9..7599659 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1704,10 +1704,11 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info * obj, index_type offset, 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 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info * obj, index_type offset, 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 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info * obj, index_type offset, } ext_name[tot_len] = '\0'; + for (q = ext_name; *q; q++) + if (*q == '+') + *q = '%'; /* Now obj_name. */ |