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



--- Comment #6 from janus at gcc dot gnu.org 2013-04-15 18:35:56 UTC ---

(In reply to comment #5)

> (In reply to comment #1)

> > Index: gcc/fortran/expr.c

> > ===================================================================

> > --- gcc/fortran/expr.c    (revision 197943)

> > +++ gcc/fortran/expr.c    (working copy)

> > @@ -3540,7 +3540,11 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_ex

> >      }

> >        else if (rvalue->expr_type == EXPR_FUNCTION)

> >      {

> > -      s2 = rvalue->symtree->n.sym->result;

> > +      if (rvalue->symtree->n.sym->attr.generic)

> > +        s2 = rvalue->value.function.esym->result;

> > +      else

> > +        s2 = rvalue->symtree->n.sym->result;

> 

> I think you should directly use

> 

> if (rvalue->value.function.esym)

>   s2 = rvalue->value.function.esym->result;



yes, I also thought about this variant. Might indeed be the better choice.





> I was additionally wondering whether one should also take care of isym besides

> esym, but probably no intrinsic returns a pointer.



I could not find any intrinsic function which returns a pointer, and even less

so a procedure pointer (which is what this patch is dealing with).

Reply via email to