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

Reply via email to