This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, fortran-dev] First attempt at new array descriptor
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: fortran at gcc dot gnu dot org, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 1 Sep 2010 07:23:26 +0200
- Subject: [Patch, fortran-dev] First attempt at new array descriptor
Discussed on #gfortran and with other gfortran developers. Committed
as revision 163715.
=== gfortran Summary ===
# of expected passes 35507
# of unexpected failures 321
# of expected failures 39
# of unsupported tests 51
/svn/build-dev/gcc/testsuite/gfortran/../../gfortran version 4.6.0
20100825 (experimental) (GCC)
Failures are in three-ish groups:
(i) Assumed shape arrays;
(ii) -fdump-tree-original counts of 'atmp' or similar (trivial); and
(iii) Library errors due to 'sm' and 'extent' fields not being set.
The plan is to remove the stride and ubound fields as soon as the
failure count is down to a few tens. Help will be appreciated to cure
the bugs :-)
Cheers
Paul
2010-09-01 Paul Thomas <pault@gcc.gnu.org>
* trans-array.c : Define and subsequently undefine descriptor
SIZE_FIELD, SM_SUBFIELD and EXTENT_SUBFIELD. Change the offset
for DIMENSION_FIELD.
(gfc_data_field_from_base_field): New function.
(gfc_conv_descriptor_data_addr): Call it to maintain API.
(gfc_dimension_field_from_base_field): New function.
(gfc_conv_descriptor_dimension): Call it.
(gfc_conv_descriptor_stride_get): Compute the stride from the
'sm' field.
(gfc_conv_descriptor_stride_set): Compute and set 'sm' field.
(gfc_conv_descriptor_sm, gfc_conv_descriptor_sm_get,
gfc_conv_descriptor_sm_set): New functions.
(gfc_conv_descriptor_extent, gfc_conv_descriptor_extent_get,
gfc_conv_descriptor_extent_set): New functions.
(gfc_conv_descriptor_ubound_get): Compute the ubound from the
'extent' field.
(gfc_conv_descriptor_ubound_set): Compute and set 'extent'
field.
trans-array.h: New prototypes for gfc_conv_descriptor_sm_get,
gfc_conv_descriptor_extent_get, gfc_data_field_from_base_field,
gfc_dimension_field_from_base_field,gfc_conv_descriptor_sm_set,
and gfc_conv_descriptor_extent_set.
trans-types.c (gfc_get_desc_dim_type): Add 'sm' and 'extent'
fields.
(gfc_get_array_descriptor_base): Add 'size' field.
(gfc_get_array_descr_info): Call gfc_data_field_from_base_field
and gfc_dimension_field_from_base_field instead of using the
field offsets explicitly.
2010-09-01 Paul Thomas <pault@gcc.gnu.org>
* libgfortran.h: Add 'sm' and 'extent' fields to structure
descriptor_dimension. Add 'size' field to array descriptor.