Hi all, attached patch fixes a crash in coarray programs when an allocatable derived typed coarray was freed explicitly. The generated cleanup code did not take into account, that the coarray may have been deallocated already. The patch fixes this by moving the statements accessing components inside the derived type into the block guard by its allocated check. Regtested ok on f37/x86_64. Ok for master? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de