This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/49397] [4.7/4.8/4.9 Regression] [F03] ICE with proc pointer assignment


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49397

--- Comment #9 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #8)
> However, the following code still ICEs:

That's fixed by the following patch.

--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3583,2 +3583,12 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr

+      /* 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]