Re: [Patch, fortran] PR126205 - A coarray allocated in a team is not being automatically deallocated
Andre Vehreschild <[email protected]> Fri, 24 Jul 2026 18:01:04 +0200
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <20260724180104.21b769b0@vepi2> |
Hi Paul, interesting issue, because the caf-libraries have a list of coarrays alloc= ated for each team and free them, when the team is left. - Andre On Fri, 24 Jul 2026 16:18:57 +0100 Paul Richard Thomas <[email protected]> wrote: > Hello All, > From John Reid's "Summary_of_Fortran_2018": >=20 > 3.5 Coarrays allocated in teams >=20 > ....snip.... >=20 > In Fortran 2018, synchronization is now across the team, of course. > Symmetric memory is maintained within teams by requiring that >=20 > 1. any allocatable coarray that is allocated before entry to a change te= am > construct remains allocated during the execution of the construct and > 2. any allocatable coarray that becomes allocated within a change team > construct and is still allocated when the construct is left is > automatically deallocated, even if it has the save attribute. >=20 > ....more snips.... >=20 > Requirement 2 is not yet implemented in gfortran. The attachment does th= e > job. >=20 > Regression tested on FC44/x86_64 - OK for mainline and eventual backport= ing > to 16-branch? >=20 > Paul =2D-=20 Andre Vehreschild * Email: vehre ad gmx dot de=20