User account creation filtered due to spam.
Bob (Robert Corbett of Oracle) reports at
that most compilers do not return a BT_CLASS when invoking one of the following procedures; I have not checked - especially as polymorphic arrays are not yet supported. But I wouldn't be surprised if gfortran had the same problems:
The Fortran standard explicitly indicates that a few intrinsic
functions (EXTENDS_TYPE_OF, SAME_TYPE_AS, and STORAGE_SIZE)
accept polymorphic arguments.
The list of intrinsic procedures that satisfy these criteria are
ALLOCATED ASSOCIATED EXTENDS_TYPE_OF
IMAGE_INDEX IS_CONTIGUOUS LBOUND
LCOBOUND MOVE_ALLOC PRESENT
SAME_TYPE_AS SHAPE SIZE
STORAGE_SIZE THIS_IMAGE UBOUND
This side thinks the following additional functions should accept
CSHIFT EOSHIFT MERGE PACK
RESHAPE SHAPE SIZE SPREAD
TRANSFER TRANSPOSE UNPACK
And in a follow up:
None of the implementations I tried treats the results of these
intrinsic functions as polymorphic. Some implementations gave no
diagnostic message for passing polymorphic acutal arguments to the
intrinsic functions, but none allowed the results to be used in
contexts that required polymorphism. I admit I find that strange.
I think the following ones should work fine (re-check?):
The array (+coarray?) intrinsics we can probably ignore for now, since we don't have polymorphic array support at this point.
A few ones that are left to check might be:
Note: CLASS-support for TRANSFER has been implemented in r193226, cf. PR 54917.