(j3.2006) Does synchronization occur?

Van Snyder Van.Snyder
Tue Oct 7 19:09:17 EDT 2014


  type :: T1
    real, allocatable :: A(:)[*]
  end type T1

  type :: T2
    type(t1), allocatable :: C
  end type T2


  subroutine S
    type(t2), allocatable :: X
    ... assume X%C%A gets allocated
  end subroutine S

Does deallocation of X%C%A cause synchronization? 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. only address the case of executing a deallocate statement
for which an <allocate-object> is a coarray. don't mention
coarrays.  Does save us?

This would be a lot clearer if simply said "deallocation"
instead of mentioning only two of at least five reasons something might
be deallocated.

More information about the J3 mailing list