https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83865
--- Comment #7 from GCC 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:7f21aee0d4ef95eee7d9f7f42e9a056715836648 commit r15-1018-g7f21aee0d4ef95eee7d9f7f42e9a056715836648 Author: Harald Anlauf <anl...@gmx.de> Date: Mon Jun 3 22:02:06 2024 +0200 Fortran: fix ALLOCATE with SOURCE=, zero-length character [PR83865] gcc/fortran/ChangeLog: PR fortran/83865 * trans-stmt.cc (gfc_trans_allocate): Restrict special case for source-expression with zero-length character to rank 0, so that the array shape is not discarded. gcc/testsuite/ChangeLog: PR fortran/83865 * gfortran.dg/allocate_with_source_32.f90: New test.