https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121628
--- Comment #4 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #3) > For debugging, one can reduce the loop body further: > > a = b > b = a > > is sufficient for a crash in the second iteration. "Unrolling" the loop, and adding explicit deallocations of the allocatable components on the lhs before the assignment, like deallocate (b%children(1)%children) deallocate (b%children) etc. gives an error Fortran runtime error: Attempt to DEALLOCATE unallocated 'a' Furthermore, adding print *, allocated (a%children), allocated (a%children(1)%children) and print *, allocated (b%children), allocated (b%children(1)%children) after the assignments to a and b resp. gives: T T and T F Maybe there is also a deep-copy issue...
