This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49397] [4.7/4.8/4.9 Regression] [F03] ICE with proc pointer assignment
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 31 Jan 2014 00:10:44 +0000
- Subject: [Bug fortran/49397] [4.7/4.8/4.9 Regression] [F03] ICE with proc pointer assignment
- Auto-submitted: auto-generated
- References: <bug-49397-4 at http dot gcc dot gnu dot org/bugzilla/>
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;