[Patch, Fortran] Coarrays: Don't (free)/alloc LHS coarray components on assignment

Tobias Burnus burnus@net-b.de
Sat Jun 22 18:19:00 GMT 2013


With coarrays, allocation/deallocation of coarrays requires a 
synchronization with all other images. Thus, the standard restricts 
changing the allocation status to: ALLOCATE and DEALLOCATE statements 
plus end-of-scope deallocation.

In particular, with intrinsic assignment the allocation status does not 
change. Hence, there is no realloc on assignment. But also (this patch!) 
no deallocation/allocation of allocatable components during intrinsic 
assignment of derived types. [This implies that the LHS componet has to 
have the same allocation status, shape, type-parameters and actual type 
as the RHS.]

The patch additionally checks whether end-of-scope deallocation of 
coarrays properly calls the deregister function (it did/does).

Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: caf_norealloc.diff
Type: text/x-patch
Size: 8527 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20130622/7b9fe4f5/attachment.bin>


More information about the Fortran mailing list