https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115700
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:36ca07f0a95c00cc985fc06e46df4028e6f2b77e commit r14-10387-g36ca07f0a95c00cc985fc06e46df4028e6f2b77e Author: Harald Anlauf <anl...@gmx.de> Date: Tue Jul 2 21:26:05 2024 +0200 Fortran: fix associate with assumed-length character array [PR115700] gcc/fortran/ChangeLog: PR fortran/115700 * trans-stmt.cc (trans_associate_var): When the associate target is an array-valued character variable, the length is known at entry of the associate block. Move setting of string length of the selector to the initialization part of the block. gcc/testsuite/ChangeLog: PR fortran/115700 * gfortran.dg/associate_69.f90: New test. (cherry picked from commit 7b7f203472d07a05d959a29638c7c95d98bf0c1c)