The code below triggers an access violation error. Obviously, this is triggered by the empty type T. I would like to know if this is a compiler error though. Sometimes empty derived types are left in a code as placeholders for future development.
PROGRAM MAIN IMPLICIT NONE TYPE T END TYPE T TYPE(T),ALLOCATABLE :: A(:),B(:) ALLOCATE(A(1),B(1)) B = A END PROGRAM MAIN
Looks like a bug. As a work around, you can add a private variable to type T (with a name like "RemoveThisWhenYouAddVariablesToT")