]> 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 17:05:56 +0000 (09:05 -0800)
commit4daf088123b2c4c3114a4b96d5353c3d72eb8ac9
tree12bb148b90c483e187801efd0431de3431aa3ebd
parent3469d0f6eaa6251882364ba304a3f67327f46a84
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.
gcc/testsuite/gfortran.dg/utf8_3.f03 [new file with mode: 0644]
libgfortran/io/write.c