The following patch is close to being obvious. With the introduction of
pointer intents, the assumption that INTENT_OUT is not a pointer and
thus the default initialization can be/has to be applied is wrong.
Without the patch, gfortran first tries to deallocate "ptr" which fails
as the pointer is uninitialized. Afterwards, it tries to apply the
default initialization due to the allocatable component, which gives an
assert of the run-time linker.
Thanks to Jürgen Reuter for including both - otherwise, I might have
forgotten to change resolve.c as well.
Build and regtested on x86-64-linux. OK for the trunk and 4.4? Shall we
also backport it to 4.3?