https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78619
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Mon Nov 13 20:43:26 2017 New Revision: 254708 URL: https://gcc.gnu.org/viewcvs?rev=254708&root=gcc&view=rev Log: 2017-11-13 Paul Thomas <pa...@gcc.gnu.org> Backport from trunk PR fortran/78619 * check.c (same_type_check): Introduce a new argument 'assoc' with default value false. If this is true, use the symbol type spec of BT_PROCEDURE expressions. (gfc_check_associated): Set 'assoc' true in the call to 'same_type_check'. 2017-11-13 Paul Thomas <pa...@gcc.gnu.org> Backport from trunk PR fortran/78619 * gfortran.dg/pr78619.f90: New test. Added: branches/gcc-7-branch/gcc/testsuite/gfortran.dg/pr78619.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/check.c branches/gcc-7-branch/gcc/testsuite/ChangeLog