(j3.2006) Does synchronization occur?
Tue Oct 7 20:27:30 EDT 2014
This one seems ok at least. Though the standard seems to have extra unnecessary
words to confuse the unwary.
Is X%C%A not a coarray?
Is it not being deallocated?
Then by 188.8.131.52p12
"There is [also] an implicit synchronization of all images in association
with the deallocation of a coarray ... caused by execution of a RETURN or END
Apart from the unnecessary "or coarray subcomponent" (why on earth is this
here?), one might also take issue with the words "in association with"! What's
that intended to mean?
In fact why is the entire p12 not simply
"When execution or a RETURN or END statement or termination of a BLOCK
construct causes deallocation of a coarray, an implicit synchronization of all
I agree with Van that p11 seems confusing; it looks like
would not cause a synchronisation because X%C is not a coarray, even though
X%C%A which is a coarray will also get deallocated (assuming that it was
allocated in the first place). Luckily p10 saves us here, but is easy to
We could consider replacing the first sentence of p11 to be something along the
"Execution of a statement that causes deallocation of a coarray causes an
implicit synchronization of all images."
(the rest of p11 looks basically ok), and deleting p12. That would simplify the
description and remove the reliance on p10 to get the semantics right.
From: Van Snyder
Date: ?? 26?10?8? 8:09
Subject: (j3.2006) Does synchronization occur?
type :: T1
real, allocatable :: A(:)[*]
end type T1
type :: T2
type(t1), allocatable :: C
end type T2
type(t2), allocatable :: X
... assume X%C%A gets allocated
end subroutine S
Does deallocation of X%C%A cause synchronization?
184.108.40.206p12 says there's synchronization when a subcomponent gets
deallocated by execution of an END statement, but X%C%A is not a
subcomponent because X%C is allocatable.
Does an argument by induction save us?
1. X gets deallocated by execution of the END statement.
2. X%C gets deallocated because X gets deallocated.
3. X%C%A gets deallocated because X%C gets deallocated.
220.127.116.11p11-12 only address the case of executing a deallocate statement
for which an <allocate-object> is a coarray. 18.104.22.168p6-7 don't mention
coarrays. Does 22.214.171.124p10 save us?
This would be a lot clearer if 126.96.36.199p11-12 simply said "deallocation"
instead of mentioning only two of at least five reasons something might
J3 mailing list
J3 at mailman.j3-fortran.org
This e-mail has been scanned for all viruses by Star.
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3