This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: another calling-fortran-from-C-question
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