What exactly are the rules for the direct assignment to the pointer returned from the function? I.e. in
at(i) = x <...> contains function at(i) type(foo_t), pointer :: at <...>
I cannot find the right place in any documentation.
Testing with GFortran, it works if
- Return type is intrinsic, e.g.
- Return type is
classof the derived type
- GFortran complains that the return type on LHS of the assignment expression does not have
pointerattribute if the return type is
Intel Fortran Classic breaks with internal error if the return type is
Does it suppose to work with
class returned type? In particularly, I want it to work with unlimited polymorphic class
class(*). I understand that this will require run-time check of types – is this the problem with
class and that is why I need to do explicit