diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2024-08-16 15:07:39 +0200 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2024-08-21 11:11:18 +0200 |
commit | 723b30bee4e4fa3feba9ef03ce7dca95501e1555 (patch) | |
tree | 8675d81a99b154ba594578ad20fd48bb4cd184c4 /libcpp | |
parent | 1e10b3b8825ee398f077500af6ae1f5db180983a (diff) | |
download | gcc-723b30bee4e4fa3feba9ef03ce7dca95501e1555.zip gcc-723b30bee4e4fa3feba9ef03ce7dca95501e1555.tar.gz gcc-723b30bee4e4fa3feba9ef03ce7dca95501e1555.tar.bz2 |
Fix coarray rank for non-coarrays in derived types. [PR86468]
The corank was propagated to array components in derived types. Fix
this by setting a zero corank when the array component is not a pointer.
For pointer typed array components propagate the corank of the derived
type to allow associating the component to a coarray.
gcc/fortran/ChangeLog:
PR fortran/86468
* trans-intrinsic.cc (conv_intrinsic_move_alloc): Correct
comment.
* trans-types.cc (gfc_sym_type): Pass coarray rank, not false.
(gfc_get_derived_type): Only propagate codimension for coarrays
and pointers to array components in derived typed coarrays.
gcc/testsuite/ChangeLog:
* gfortran.dg/coarray_lib_this_image_2.f90: Fix array rank in
tree dump scan.
* gfortran.dg/coarray_lib_token_4.f90: Same.
* gfortran.dg/coarray/move_alloc_2.f90: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions