]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Assign allocated caf-memory to scalar members [PR84870]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 19 Sep 2024 13:09:52 +0000 (15:09 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Tue, 24 Sep 2024 11:15:37 +0000 (13:15 +0200)
commitf5035d7d015ebd4a7f5df5831cfc1269f9567e06
tree5eb7f5d1241a9e18d971de5d55da4b7eaa2f07e6
parent9a795b3a5b6a0d8b4b4f38a66ab9782aabead92e
Fortran: Assign allocated caf-memory to scalar members [PR84870]

Allocating a coarray required an array-descriptor.  For scalars a
temporary descriptor was created.  Assigning the allocated memory from
the temporary descriptor back to the scalar is now added.

gcc/fortran/ChangeLog:

PR fortran/84870

* trans-array.cc (duplicate_allocatable_coarray): For scalar
allocatable components the memory allocated is now assigned to
the component's pointer.

gcc/testsuite/ChangeLog:

* gfortran.dg/coarray/alloc_comp_10.f90: New test.
gcc/fortran/trans-array.cc
gcc/testsuite/gfortran.dg/coarray/alloc_comp_10.f90 [new file with mode: 0644]