https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89077
--- Comment #14 from anlauf at gcc dot gnu.org --- Author: anlauf Date: Sun Feb 10 20:01:15 2019 New Revision: 268752 URL: https://gcc.gnu.org/viewcvs?rev=268752&root=gcc&view=rev Log: 2019-02-10 Harald Anlauf <anl...@gmx.de> Backport from trunk PR fortran/89077 * decl.c (add_init_expr_to_sym): Copy length of string initializer to declared symbol. PR fortran/89077 * gfortran.dg/pr89077.f90: New test. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/pr89077.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/decl.c branches/gcc-8-branch/gcc/testsuite/ChangeLog