]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix deep copy allocatable components in coarrays. [PR85002]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Fri, 23 Aug 2024 07:07:09 +0000 (09:07 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 19 Sep 2024 07:52:23 +0000 (09:52 +0200)
commit361903ad1affd508bafdb9b771d6a6ffc98a2100
tree5b6ceb6472bef3fa21623833de5bc1fe67b47e95
parent08aba2dd8c9390b6131cca0aac069f97eeddc9d2
Fix deep copy allocatable components in coarrays. [PR85002]

Fix code for deep copy of allocatable components in derived type nested
structures generated, but not inserted when the copy had to be done in
a coarray.  Additionally fix a comment.

gcc/fortran/ChangeLog:

PR fortran/85002
* trans-array.cc (duplicate_allocatable_coarray): Allow adding
of deep copy code in the when-allocated case.  Add bounds
computation before condition, because coarrays need the bounds
also when not allocated.
(structure_alloc_comps): Duplication in the coarray case is done
already, omit it.  Add the deep-code when duplication a coarray.
* trans-expr.cc (gfc_trans_structure_assign): Fix comment.

gcc/testsuite/ChangeLog:

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