Hi all, here is a patch which does several things: 1) It fixes the original problem in the PR (cf. comments 0 and 6) by adding code which checks if a generic interface has a specific procedure of the same name (see resolve_procedure_interface). 2) It fixes other problems found along the way (cf. comment 7), which are all due to the fact that the checks for interface declarations in PROCEDURE statements came too early (checks for generics, statement functions and intrinsics are moved from "match_procedure_interface" to "resolve_procedure_interface"). For the intrinsics we do the same trick as for PR51081, by setting the flavor at parsing stage and later setting the INTRINSIC attribute at resolution stage. 3) It does minor cleanup related to "gfc_is_intrinsic", by moving some checks into the routine, which were typically done before calling the routine in a several places. (This is also related to the recent patch for PR51081.) Note that 'use_assoc' is not sufficient to identify a routine as non-intrinsic (apparently this was wrongly assumed in some cases). The patch was regtested successfully on x86_64-unknown-linux-gnu. Ok for trunk? Cheers, Janus 2012-07-31 Janus Weil PR fortran/42418 * decl.c (match_procedure_interface): Move some checks to 'resolve_procedure_interface'. Set flavor if appropriate. * expr.c (gfc_check_pointer_assign): Cleanup of 'gfc_is_intrinsic'. * intrinsic.c (gfc_is_intrinsic): Additional checks for attributes which identify a procedure as being non-intrinsic. * resolve.c (resolve_procedure_interface): Checks moved here from 'match_procedure_interface'. Minor cleanup. (resolve_formal_arglist,resolve_symbol): Cleanup of 'resolve_procedure_interface' (resolve_actual_arglist,is_external_proc): Cleanup of 'gfc_is_intrinsic'. 2012-07-31 Janus Weil PR fortran/42418 * gfortran.dg/proc_decl_29.f90: New.