09-181 To: J3 From: Van Snyder Subject: Fodder for coarray TR Date: 2009 April 03 References: 09-007r1 1. Allow whole-array coindexed object references. As Malcolm pointed out in e-mail of Jan 15 21:48:06 EST 2009, "The decision [to prohibit them] has already caused harm to the standard as Van pointed out, and will continue to cause harm (by the added complication) to people trying to untangle our complicated syntax, compiler writers if they can be bothered to follow the standard (they have to write additional tests to conform to the standard, once we allowed coarray scalars there was no possibility of simpler syntax parsing), users who don't see the reason they should be forced to write tedious unnecessary additional text. 2. Allow automatic coarrays. This requires synchronization at procedure (BLOCK) entry if a procedure has any automatic coarrays. Synchronization is already required at procedure (BLOCK) exit if the procedure (BLOCK) allocates any local coarrays. Actually the processor will probably emit a bunch of deallocates, each conditional on whether the object is allocated, and each one of those will cause a synchronization. It might be more efficient to have one synchronization at procedure entry, instead of one at each explicit allocation and deallocation of what would otherwise be an automatic coarray. It is possible for a procedure to provide for numerous automatic arrays more efficiently than a user can with explicit allocations, by visiting the allocator once to get enough memory for all the automatic objects, then working out their addresses, and finally visiting the deallocator only once when they disappear. The same might hold for automatic coarrays. 3. Allow coarrays with intent(out) to have allocatable components. This requires synchronization at procedure entry if a procedure has any such arguments. Synchronization is already required at procedure exit if the procedure allocates any local coarrays. It might be more efficient to have one synchronization at procedure entry, instead of one at each explicit deallocation of a coarray component of a dummy argument that would otherwise have intent(out). Not having intent(out) might compromise the efficacy of some optimizations of referencing scoping units.