[patch, fortran-dev] Finalize array access macros, fix PR 40187
Thomas Koenig
tkoenig@netcologne.de
Fri May 29 18:03:00 GMT 2009
Hello world,
this is the final array access macro patch. It also implements the fix
for PR 40187, which is already on trunk, in a slightly different way in
order to accomodate these macros.
In "poisoning" the struct descripto_dimenson by changing the names of
its members, I found I'd over looked a few cases (as was to be
expected :-)
Test cases are identical to trunk, not re-attached. Regression-tested
on i686-pc-linux-gnu. OK for the branch?
Thomas
2009-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/37577
PR libfortran/40187
* runtime/in_pack_generic (internal_pack): Remove unnecessary
test for stride == 0.
* runtime/in_unpack_generic.c (internal_unpack): Likewise.
* intrinsics/iso_c_binding.c (c_f_pointer_u0): Take care
of stride in "shape" argument. Use array access macros for
accessing array descriptors.
* libgfortran.h (struct descriptor_dimension): Change stride
to _stride, lbound to _lbound and ubound to _ubound.
(GFC_DIMENSION_LBOUND): Use new name(s) in struct
descriptor_dimension.
(GFC_DIMENSION_UBOUND): Likewise.
(GFC_DIMENSION_STRIDE): Likewise.
(GFC_DIMENSION_EXTENT): Likewise.
(GFC_DIMENSION_SET): Likewise.
(GFC_DESCRIPTOR_LBOUND): Likewise.
(GFC_DESCRIPTOR_UBOUND): Likewise.
(GFC_DESCRIPTOR_EXTENT): Likewise.
(GFC_DESCRIPTOR_STRIDE): Likewise.
* io/transfer.c (transfer_array): Use array access macros.
Use byte-sized strides.
2009-05-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/40187
* gfortran.dg/c_f_pointer_shape_tests_4.f03: New file.
* gfortran.dg/c_f_pointer_shape_tests_4_driver.c: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: m-final.diff
Type: text/x-patch
Size: 8408 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090529/d8bb30d9/attachment.bin>
More information about the Gcc-patches
mailing list