[J3] Assumed-type dummy argument descriptor

Damian Rouson rouson at lbl.gov
Fri Apr 7 04:58:51 UTC 2023


Clause 16.9.284 of the Fortran 2018 standard defines the STORAGE_SIZE()
intrinsic function.  In describing the function's one non-optional
argument, the standard states, "If it is unlimited polymorphic or has
any deferred
type parameters, it shall not be an unallocated allocatable variable or a
disassociated or undefined pointer."  Constraint C709 stipulates "An
assumed-type entity shall be a dummy data object that does not have the
ALLOCATABLE, CODIMMENSION, INTENT (OUT), POINTER, or VALUE attribute and is
not an explicit-shape array."

Given that an assumed-type dummy data object cannot have the ALLOCATABLE
attribute, it seems that STORAGE_SIZE() definition must be referring to the
actual argument. What would be the point in stipulating that an unlimited
polymorphic data object shall not be an unallocated allocatable variable if
it can't have the allocatable attribute?    I think this suggests that the
CFI_cdesc_t descriptor describes the actual argument associated with an
unlimited polymorphic dummy argument.  I know there was a related debate at
the most recent J3 meeting, but I don't know the outcome.

Damian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230406/f0f6059c/attachment.htm>


More information about the J3 mailing list