This PR is meant to track one leftover item related to procedure pointer components: No pointer assignment checking is performed yet when a PPC is involved, cf. the TODO comment in expr.c (gfc_check_pointer_assign). Short test case: implicit none type :: t1 procedure(integer), pointer, nopass :: ppc end type type :: t2 procedure(real), pointer, nopass :: ppc end type type(t1) :: o1 type(t2) :: o2 procedure(logical),pointer :: pp1 procedure(complex),pointer :: pp2 pp1 => pp2 o1%ppc => pp1 pp2 => o2%ppc o1%ppc => o2%ppc end All four pointer assignments in this example are invalid, but only the first one is caught.
Subject: Bug 40869 Author: janus Date: Thu Aug 27 19:48:46 2009 New Revision: 151147 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151147 Log: 2009-08-27 Janus Weil <janus@gcc.gnu.org> PR fortran/40869 * expr.c (gfc_check_pointer_assign): Enable interface check for pointer assignments involving procedure pointer components. * gfortran.h (gfc_compare_interfaces): Modified prototype. * interface.c (gfc_compare_interfaces): Add argument 'name2', to be used instead of s2->name. Don't rely on the proc_pointer attribute, but instead on the flags handed to this function. (check_interface1,compare_parameter): Add argument for gfc_compare_interfaces. * resolve.c (check_generic_tbp_ambiguity): Ditto. 2009-08-27 Janus Weil <janus@gcc.gnu.org> PR fortran/40869 * gfortran.dg/proc_ptr_comp_20.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/expr.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/interface.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
Fixed with r151147. Closing.