I have attached a small program with relevant comments that demonstrate the issues. This happens with version 12.1 on opensuse 11.4. Here is a small summary of what I am seeing:
The following works in the main program, but it fails if I send vct to a subroutine and use the same allocate statement.
TYPE(Vector) :: vct
CLASS(*) :: v
ALLOCATE(v, SOURCE=vct)
DEALLOCATE(v)
However, it is possible to do
ALLOCATE(Vector::v)
SELECT TYPE (v)
TYPE IS (Vector)
v = vct
END SELECT
DEALLOCATE(v)
But, this causes a memory leak.