http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51081
--- Comment #9 from janus at gcc dot gnu.org 2012-07-29 19:04:25 UTC --- The following patch adds diagnostics to reject the invalid test case in comment 8: Index: gcc/fortran/expr.c =================================================================== --- gcc/fortran/expr.c (revision 189929) +++ gcc/fortran/expr.c (working copy) @@ -3444,6 +3444,13 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_ex "at %L", rvalue->symtree->name, &rvalue->where) == FAILURE) return FAILURE; + if (attr.intrinsic && gfc_intrinsic_actual_ok (rvalue->symtree->name, + attr.subroutine) == 0) + { + gfc_error ("Intrinsic '%s' at %L is invalid in procedure pointer " + "assignment", rvalue->symtree->name, &rvalue->where); + return FAILURE; + } } /* Check for F08:C730. */ if (attr.elemental && !attr.intrinsic)