Skip to content
Snippets Groups Projects
Commit 723b30be authored by Andre Vehreschild's avatar Andre Vehreschild
Browse files

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.
parent 1e10b3b8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment