[Patch, gfortran] PR26257 - Ping

Erik Edelmann erik.edelmann@iki.fi
Tue Mar 7 12:35:00 GMT 2006


On Mon, Mar 06, 2006 at 08:48:35PM +0100, Paul Thomas wrote:
> Paul Thomas wrote:
> 
> >Paul Thomas wrote:
> >
> >Ping!
> >
> >Original is found on http://gcc.gnu.org/ml/fortran/2006-02/msg00553.html.
> >
> >The patch has evolved slightly, although the principle is the same.  
> >Instead of testsing for the symbol possessing a namespace, the caller 
> >explicitly demands that the data and offset fields not be filled, 
> >through a new bitfield in gfc_se.
> >
> >Again, regtested on FC3/Athlon.
> >
> >Paul
> >
> >>:ADDPATCH fortran:
> >>
> >>With reference to the attached testcase, the seg fault due to the 
> >>function being use associated - the segfault occurs via the route 
> >>gfc_conv_intrinsic_size => gfc_conv_expr_descriptor => 
> >>gfc_build_addr_expr, which is needed to calculate the potential 
> >>offset between the full array and the actual argument of SIZE, which 
> >>is assumed to be an array section.  However, seen from the main 
> >>program, the address of a dummy argument of a module procedure is not 
> >>the most readily available thing in the world - in fact, it has 
> >>already gone out of scope.
> >>
> >>Happily, SIZE does not need the offset or the data, come to that.  
> >>Thus a patch, in which we check that the symbol belongs to a 
> >>namespace before trying to provoke a segfault, judiciously deposited 
> >>in gfc_conv_expr_descriptor, does the job.  This patch is attached, 
> >>together with a testsuite version of the reduced PR testcase.
> >>
> >>Regtested on FC3/Athlon.
> >>
> >>OK for mainline and 4.1, when reopened?

Ok, with one small correction.

> >>2006-02-29  Paul Thomas  <pault@gcc.gnu.org>
> >>
> >>   PR fortran/26257
> >>   * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of 
> >>the offset
> >>   for arrays without a namespace - ie. module procedure dummies.
> >>
> >>2006-02-29  Paul Thomas  <pault@gcc.gnu.org>
> >>
> >>   PR fortran/26257
> >>   gfortran.dg/auto_char_len_3.f90: New test
      ^

A '*' is missing here.


        Erik



More information about the Fortran mailing list