https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104127
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:6c1a93102b41a558f3ad49a7c66015257535c747 commit r12-6816-g6c1a93102b41a558f3ad49a7c66015257535c747 Author: Harald Anlauf <anl...@gmx.de> Date: Thu Jan 20 22:36:50 2022 +0100 Fortran: fix simplification of TRANSFER for zero-sized character array result gcc/fortran/ChangeLog: PR fortran/104127 * simplify.cc (gfc_simplify_transfer): Ensure that the result typespec is set up for TRANSFER with MOLD of type CHARACTER including character length even if the result is a zero-sized array. gcc/testsuite/ChangeLog: PR fortran/104127 * gfortran.dg/transfer_simplify_11.f90: Fix logic. * gfortran.dg/transfer_simplify_13.f90: New test.