Defined assignment for polymorphic variables

@plevold , you may know of this thread and this one, you may want to review them.

Separately, do note given how things are with the Fortran standard, there is no safe and portable way to do what you show with your x = my_t() statement in the 2nd BLOCK construct i.e., to achieve allocation-upon-assignment with a defined assignment that is type-bound generic binding to a type-bound procedure. You may want to eshew defined assignments generally but if needed in certain attenuating circumstances, consider a Fortran 90-style generic interface for them instead.

Besides please note there are several nonconforming aspects in your code starting with your dummy argument lhs in your assgn procedure having an INTENT(OUT) attribute while the argument doesn’t get defined in the subprogram. It’s surprising the compiler(s) didn’t detect and report this, some bug reports appear to be due.