https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89077
--- Comment #15 from anlauf at gcc dot gnu.org --- Author: anlauf Date: Sun Feb 10 20:05:34 2019 New Revision: 268753 URL: https://gcc.gnu.org/viewcvs?rev=268753&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-7-branch/gcc/testsuite/gfortran.dg/pr89077.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/decl.c branches/gcc-7-branch/gcc/testsuite/ChangeLog