https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118571
--- Comment #1 from kargls at comcast dot net ---
Trimming the testcase to show to clean up the -fdump-tree-original output.
program test
use iso_fortran_env
implicit none
integer, parameter :: ucs4 = selected_char_kind('ISO_10646')
character(kind=ucs4, len=1), parameter :: alpha = char(int(z'03B1'), ucs4)
character(kind=ucs4, len=1), parameter :: beta = char(int(z'03B2'), ucs4)
integer fd
character(kind=ucs4,len=:), allocatable :: str
fd = output_unit
open (fd, encoding='UTF-8')
str = alpha // beta // alpha // beta
write(fd,'(A1)') str
end program
% gfcx -o z -fdump-tree-original jj.f90 && ./z
αβαβ
{
struct __st_parameter_dt dt_parm.3;
dt_parm.3.common.filename = &"jj.f90"[1]{lb: 1 sz: 1};
dt_parm.3.common.line = 12;
dt_parm.3.format = &"(A1)"[1]{lb: 1 sz: 1};
dt_parm.3.format_len = 4;
dt_parm.3.common.flags = 4096;
dt_parm.3.common.unit = fd;
_gfortran_st_write (&dt_parm.3);
_gfortran_transfer_character_wide_write (&dt_parm.3, str, .str, 4);
_gfortran_st_write_done (&dt_parm.3);
}