Note: subject title edited to reflect more accurately the condition below.
See example attached - run with 12 images. Image 1 gets 'stuck'. Switching the declaration of A from coarray to regular array highlights the difference in behavior... This is with 16 Update 3 and 17 Beta.
Sigh... how many of these are still left with coarrays :'(
PROGRAM MAIN IMPLICIT NONE TYPE T INTEGER(KIND=8),ALLOCATABLE :: U(:) END TYPE T TYPE(T) :: A
I can reproduce this with four images. At first I was hung up on what happens when coarrays get allocated an dellocated, but your program isn't doing that. I will send this on to the developers, issue ID DPD200411068.
Along the way, I noticed that F2008 doesn't discuss coarrays at all in the context of MOVE_ALLOC, whereas the F2015 draft does.
This bug will be fixed for the final 17.0 product release. The compiler was confused as to whether it was dealing with a coarray and added synchronization code it shouldn't have.