This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] PR40646 - ICE assigning array return value from type-bound procedure


Paul Richard Thomas wrote:
> The attached is verging on obvious.
> Bootstrapped and regtested on FC9/x86_64 - OK for trunk?
>   
The patch looks OK and is verging on obvious. However, I am wondering
whether one should not (also) already fill esym in resolve.c (untested):

--- resolve.c   (revision 149208)
+++ resolve.c   (working copy)
@@ -4817,5 +4817,5 @@ resolve_compcall (gfc_expr* e)
   e->value.function.name = e->value.compcall.name;
   e->value.function.isym = NULL;
-  e->value.function.esym = NULL;
+  e->value.function.esym = e->value.compcall.tbp->u.specific->n.sym;
   e->symtree = target;
   e->ts = target->n.sym->ts;


Tobias

> 2009-07-04  Paul Thomas  <pault@gcc.gnu.org>
>
> 	PR fortran/40646
> 	* trans-expr.c (gfc_trans_arrayfunc_assign): Make sure that the
> 	esym field of the expression is filled and use is_proc_ptr_comp
> 	in the condition.
>
> 2009-07-04  Paul Thomas  <pault@gcc.gnu.org>
>
> 	PR fortran/40646
> 	* gfortran.dg/func_assign_3.f90 : New test


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]