+2014-02-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49397
+ * expr.c (gfc_check_pointer_assign): Add check for
+ F2008Cor2, C729.
+ * trans-decl.c (gfc_get_symbol_decl): Correctly generate external
+ decl in a corner case.
+
2014-02-18 Janus Weil <janus@gcc.gnu.org>
PR fortran/60231
return false;
}
+ /* Check F2008Cor2, C729. */
+ if (!s2->attr.intrinsic && s2->attr.if_source == IFSRC_UNKNOWN
+ && !s2->attr.external && !s2->attr.subroutine && !s2->attr.function)
+ {
+ gfc_error ("Procedure pointer target '%s' at %L must be either an "
+ "intrinsic, host or use associated, referenced or have "
+ "the EXTERNAL attribute", s2->name, &rvalue->where);
+ return false;
+ }
+
return true;
}
if (sym->attr.flavor == FL_PROCEDURE)
{
- /* Catch function declarations. Only used for actual parameters,
+ /* Catch functions. Only used for actual parameters,
procedure pointers and procptr initialization targets. */
- if (sym->attr.external || sym->attr.use_assoc || sym->attr.intrinsic)
+ if (sym->attr.use_assoc || sym->attr.intrinsic
+ || sym->attr.if_source != IFSRC_DECL)
{
decl = gfc_get_extern_function_decl (sym);
gfc_set_decl_location (decl, &sym->declared_at);
+2014-02-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49397
+ * gfortran.dg/proc_ptr_45.f90: New.
+ * gfortran.dg/proc_ptr_46.f90: New.
+
2014-02-18 Adam Butcher <adam@jessamine.co.uk>
PR c++/60190