When the following test case is compiled with the 14.0.2 compiler, the executable returns T for the allocation status of X%FOO when it is clearly not allocated.
program main type :: T1 class(*), allocatable :: bar end type type :: T2 type(T1), allocatable :: foo end type type(T2) :: x allocate(x%foo) deallocate(x%foo) print *, allocated(x%foo), ' (expect F)' ! GIVES THE WRONG RESULT end program
I've also attached the code for convenience. The underlying cause of the problem may in fact be the same as for DPD200249493 which I reported last October. The two examples are very similar but not identical. I only recognized their similarities after spending several hours stripping a wad of actual code back to this example. There was a workaround in that case, which involved nullifying a pointer; is there a workaround in this case?