aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2024-01-07 10:22:19 -0800
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2024-01-07 10:32:04 -0800
commitadd995ec117d756e61d207041cd32f937c1a1cd9 (patch)
tree15db8e8bef21cfac0376a11e3c1b45bc24ce346e /libgfortran
parent0a8aba760f62e9d66cc5610ecc276c1f0befc651 (diff)
libgfortran: Emit a space at beginning of internal unit NML.
PR libgfortran/113223 libgfortran/ChangeLog: * io/write.c (namelist_write): If internal_unit precede with space. gcc/testsuite/ChangeLog: * gfortran.dg/dtio_25.f90: Update. * gfortran.dg/namelist_57.f90: Update. * gfortran.dg/namelist_65.f90: Update.
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/io/write.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index a0401fed4e0..49beaee4724 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -2466,6 +2466,8 @@ namelist_write (st_parameter_dt *dtp)
dtp->u.p.nml_delim = '\0';
}
+ if (is_internal_unit (dtp))
+ write_character (dtp, " ", 1, 1, NODELIM);
write_character (dtp, "&", 1, 1, NODELIM);
/* Write namelist name in upper case - f95 std. */