another calling-fortran-from-C-question

Daniel Franke daniel.franke@imbs.uni-luebeck.de
Wed Jun 29 08:59:00 GMT 2005


On Tuesday 28 June 2005 23:22, Tobias Schlüter wrote:
> but deferred-shape arrays are very different beasts: to handle them the
> subroutine needs to be passed detailed information about the array, as the
> whole layout of the array is variable.  See the description around
> trans-types.c:710 for how this is handled in gfortran.  

A minor note:
While looking for a description of the base- and data-members, I found that 
the comments in gcc/fortran/trans-types.c are out of sync given the actual 
types in libgfortran/libgfortran.h:

gcc/fortran/trans-types.c
  706    struct gfc_array_descriptor
  707    {
  708      array *data
  709      index offset;
  710      index dtype;
  711      struct descriptor_dimension dimension[N_DIM];
  712    }

libgfortran/libgfortran.h
  248    #define GFC_ARRAY_DESCRIPTOR(r, type) \
  249    struct {\
  250      type *data;\
  251      type *base;\
  252      index_type dtype;\
  253      descriptor_dimension dim[r];\
  254    }

Have a nice day
	Daniel



More information about the Fortran mailing list