https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99125
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:7987beec679898cfa75839551d55ae5234a216bd commit r11-7657-g7987beec679898cfa75839551d55ae5234a216bd Author: Paul Thomas <pa...@gcc.gnu.org> Date: Sat Mar 13 11:39:57 2021 +0000 Fortran: Fix for class defined operators [PR99125]. 2021-03-13 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/99125 * trans-array.c (gfc_conv_expr_descriptor): For deferred length length components use the ss_info string length instead of gfc_get_expr_charlen. Make sure that the deferred string length is a variable before assigning to it. Otherwise use the expr. * trans-expr.c (gfc_conv_string_length): Make sure that the deferred string length is a variable before assigning to it. gcc/testsuite/ PR fortran/99125 * gfortran.dg/alloc_deferred_comp_1.f90: New test.