https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83149
--- Comment #15 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Wed May 16 11:42:47 2018 New Revision: 260286 URL: https://gcc.gnu.org/viewcvs?rev=260286&root=gcc&view=rev Log: 2018-05-16 Paul Thomas <pa...@gcc.gnu.org> PR fortran/83149 Backport from trunk * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name before accessing its components. * trans-types.c (gfc_sym_type): If a character result has null backend_decl, try the procedure symbol. 2018-05-16 Paul Thomas <pa...@gcc.gnu.org> PR fortran/83149 Backport from trunk * gfortran.dg/pr83149_1.f90: New test. * gfortran.dg/pr83149.f90: Additional source for previous. * gfortran.dg/pr83149_b.f90: New test. * gfortran.dg/pr83149_a.f90: Additional source for previous. Added: branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr83149.f90 branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr83149_1.f90 branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr83149_a.f90 branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr83149_b.f90 Modified: branches/gcc-6-branch/gcc/fortran/ChangeLog branches/gcc-6-branch/gcc/fortran/trans-decl.c branches/gcc-6-branch/gcc/fortran/trans-types.c branches/gcc-6-branch/gcc/testsuite/ChangeLog