This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47352] [F03] ICE with proc-pointers in generic procedures
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Jan 2011 21:21:33 +0000
- Subject: [Bug fortran/47352] [F03] ICE with proc-pointers in generic procedures
- Auto-submitted: auto-generated
- References: <bug-47352-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47352
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #3 from janus at gcc dot gnu.org 2011-01-19 21:21:30 UTC ---
Simple patch to avoid the ICE:
Index: gcc/fortran/trans-expr.c
===================================================================
--- gcc/fortran/trans-expr.c (revision 168973)
+++ gcc/fortran/trans-expr.c (working copy)
@@ -4827,7 +4827,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * e
}
if (expr->expr_type == EXPR_FUNCTION
- && ((expr->value.function.esym
+ && ((expr->value.function.esym && expr->value.function.esym->result
&& expr->value.function.esym->result->attr.pointer
&& !expr->value.function.esym->result->attr.dimension)
|| (!expr->value.function.esym