]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix UTF-8 output with A edit descriptor.
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 23 Jan 2025 20:58:14 +0000 (12:58 -0800)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 24 Jan 2025 23:14:21 +0000 (15:14 -0800)
commitb69eb2c594f8595718d876dc9811e3820eb68da1
tree14e23761c2727e119c20bc3292926f6996e93d44
parentd4df61dc6ed90e6614db213119858adde939fc97
Fortran: Fix UTF-8 output with A edit descriptor.

This adjusts the source len for the case where the user has
specified a field width with the A descriptor.

PR libfortran/118571

libgfortran/ChangeLog:

* io/write.c (write_utf8_char4): Adjust the src_len to the
format width w_len when greater than zero.

gcc/testsuite/ChangeLog:

* gfortran.dg/utf8_3.f03: New test.

(cherry picked from commit 4daf088123b2c4c3114a4b96d5353c3d72eb8ac9)
gcc/testsuite/gfortran.dg/utf8_3.f03 [new file with mode: 0644]
libgfortran/io/write.c