https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88117
--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to Paul Thomas from comment #8) > Author: pault > Date: Sat Feb 23 13:18:47 2019 > New Revision: 269157 > > URL: https://gcc.gnu.org/viewcvs?rev=269157&root=gcc&view=rev > Log: > 2019-02-23 Paul Thomas <pa...@gcc.gnu.org> > > PR fortran/88117 > * resolve.c (deferred_op_assign): Return if the lhs expression > has the pointer attribute. > * trans-expr.c (gfc_trans_assignment_1): Do not fix the string > length if the lhs expression has the pointer attribute. > > 2019-02-23 Paul Thomas <pa...@gcc.gnu.org> > > PR fortran/88117 > * gfortran.dg/deferred_character_32.f90 : New test > > Added: > trunk/gcc/testsuite/gfortran.dg/deferred_character_32.f90 > Modified: > trunk/gcc/fortran/ChangeLog > trunk/gcc/fortran/resolve.c > trunk/gcc/fortran/trans-expr.c > trunk/gcc/testsuite/ChangeLog I committed as 'obvious' to trunk. The testcase does not produce correct code on 8- or 7-branches. The part of the patch in resolve.c fixes this and so I intend to backport since it is obvious that extra temporary creation should not be necessary here; pointers being the same as non-allocatable/non-pointer lhs's in this context. Please note, that the testcase works fine on trunk if 'z' is made allocatable. Paul