]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix handling of shared coarray indexing.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 16 Dec 2020 20:06:09 +0000 (21:06 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Wed, 16 Dec 2020 20:06:09 +0000 (21:06 +0100)
commitb128055dc797e8cb9abe92284892a0d528c7151b
treea67f97c2841b349661fe44a65e90fca3020a4a7f
parent003b3ce345491e1c70e88320457954313050d7d9
Fix handling of shared coarray indexing.

gcc/fortran/ChangeLog:

* dependency.c: Add options.h header.
(gfc_full_array_ref_p): Coarrays only are full if the have DIMEN_STAR.
* trans-array.c (cas_add_strides): Remove.
(cas_add_this_image_offset): Reorganize.
(cas_impl_this_image_ref): Fix return for reference.
(gfc_conv_ss_descriptor): Fix handling of offset.
(gfc_conv_array_ref): Likewise.
(gfc_trans_preloop_setup): Use effective dimension.
(gfc_conv_section_startstride): Shared coarrays should be handled
like deferred arrays.
(gfc_get_dataptr_offset): Adjust call to cas_add_this_image_offset.
(gfc_conv_expr_descriptor): Adjust dimensions.
(gfc_walk_array_ref): Likewise.
* trans-types.c (gfc_sym_type): Handle shared coarrays like
allocatable arrays.
(gfc_get_derived_type): Likewise.

gcc/testsuite/ChangeLog:

* gfortran.dg/caf-shared/lower_cobound_1.f90: New test.
* gfortran.dg/caf-shared/whole_array_1.f90: New test.
gcc/fortran/dependency.c
gcc/fortran/trans-array.c
gcc/fortran/trans-types.c
gcc/testsuite/gfortran.dg/caf-shared/lower_cobound_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/caf-shared/whole_array_1.f90 [new file with mode: 0644]