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] PR 28416: Passing allocatable dummies onwards to procedures with implicit interfa ce (was: Re: PR 28416 (was: Re: ICE on PR20541 - a llocatable components of Âderived types (TR15581)))


Erik,

OK - 'cept my name does not merit being in the ChangeLog; I injected random noise into teh process.


Paul



> Message du 22/07/06 23:40
> De : "Erik Edelmann" 
> A : "Paul THOMAS" , "gcc-patches" 
> Copie à : fortran@gcc.gnu.org
> Objet : [patch,fortran] PR 28416: Passing allocatable dummies onwards to procedures with implicit interface (was: Re: PR 28416 (was: Re: ICE on PR20541 - allocatable components of  derived types (TR15581)))
> 
> On Sat, Jul 22, 2006 at 09:46:05AM +0200, Paul THOMAS wrote:
> > > > It produces:
> > > > 
> > > > foo (v_out)
> > > > {
> > > > bar ((struct array1_int4 *) v_out);
> > > > foobar (v_out);
> > > > }
> > > 
> > > I think we should pass v_out->data to foobar, rather than v_out itself.
> > > I'll continue to investigate the issue.
> > > 
> > 
> > Are you sure that this is right? In my opinion, it would not be
> > correct to pass allocatable objects as anything other than assumed
> > shape, as happens with an explicit interface. However, we should
> > check what the F2003 standard says about it.
> 
> If one compiles the attached testcase with -fdump-tree-original, and look
> at the code generated for 'bar', it obviously expects a plain pointer to
> the data, rather than a full descriptor. The attaced patch does that.
> 
> Regtested on trunk, Linux/x86. Ok?
> 
> 
> 2006-07-22 Erik Edelmann 
> Paul Thomas 
> 
> PR fortran/28416
> * trans-array.c (gfc_conv_array_parameter): Give special treatment to
> ALLOCATABLEs if they are themselves dummy variables.
> 
> 
> 2006-07-22 Erik Edelmann 
> 
> PR fortran/28416
> * gfortran.dg/allocatable_dummy_3.f90: New.
> 
> 
> 
> Erik
> 
> >
> [ pr28416.diff (0.6 Ko) ]
> [ allocatable_dummy_3.f90 (0.7 Ko) ]


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