[Bug fortran/49397] [4.7/4.8/4.9 Regression] [F03] ICE with proc pointer assignment
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 31 00:10:00 GMT 2014
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;
More information about the Gcc-bugs
mailing list