This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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, 66927, v1] [6 Regression] ICE in gfc_conf_procedure_call


On Thu, 6 Aug 2015 14:00:56 +0200
Mikael Morin <mikael.morin@sfr.fr> wrote:

> Le 06/08/2015 12:53, Andre Vehreschild a Ãcrit :
> > Dear all,
> >
> > the attached patch fixes a regression introduced by my patches for the
> > F2008-style allocate(). In this case a function returning an array of
> > BT_CLASS objects can not be conv'ed using conv_expr_descriptor, but needs
> > to be conv_expr_reference()'ed, because the _data component has the
> > descriptor already and just needs to be addressed correctly.
> >
> > Bootstraps and regtests ok on x86_64-linux-gnu/f21.
> >
> > Ok for trunk?
> >
> > Regards,
> > 	Andre
> >
> > pr66927_1.patch
> >
> > diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
> > index 6409f7f..3f90b76 100644
> > --- a/gcc/fortran/trans-stmt.c
> > +++ b/gcc/fortran/trans-stmt.c
> > @@ -5187,9 +5187,14 @@ gfc_trans_allocate (gfc_code * code)
> >  	  /* In all other cases evaluate the expr3.  */
> >  	  symbol_attribute attr;
> >  	  /* Get the descriptor for all arrays, that are not allocatable or
> > -	     pointer, because the latter are descriptors already.  */
> > +	     pointer, because the latter are descriptors already.
> > +	     The exception are function calls returning a class object:
> > +	     For those conv_expr_descriptor does not work.  */
> 
> So, it is gfc_conv_expr_descriptor that should be fixed?
> Let me have a look at it.

Er, yes, and now. gfc_conv_expr_descriptor would need a fix, but that fix is
only needed for allocate() all other callers must not be affected. That's why I
did not try to fix it in gfc_conv_expr_descriptor().

- Andre
-- 
Andre Vehreschild * Email: vehre ad gmx dot de 


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