This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, 66927, v1] [6 Regression] ICE in gfc_conf_procedure_call
- From: Andre Vehreschild <vehre at gmx dot de>
- To: Mikael Morin <mikael dot morin at sfr dot fr>
- Cc: GCC-Patches-ML <gcc-patches at gcc dot gnu dot org>, GCC-Fortran-ML <fortran at gcc dot gnu dot org>
- Date: Thu, 6 Aug 2015 14:08:02 +0200
- Subject: Re: [Patch, Fortran, 66927, v1] [6 Regression] ICE in gfc_conf_procedure_call
- Authentication-results: sourceware.org; auth=none
- References: <20150806125316 dot 60cbd443 at vepi2> <55C34C78 dot 6050407 at sfr dot fr>
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