On 12/16/19 9:06 AM, Tobias Burnus wrote:
Ping.
On 12/10/19 6:54 PM, Tobias Burnus wrote:
Nonallocatable, nonpointer array arguments (of assumed shape) are
special as they get a get an array descriptor ('arg') as argument but
create a local variable which accesses the actual data ('arg.0 =
arg->data').
With OPTIONAL, there are/were two outstanding issues:
(A) If the argument is not present, 'arg.0' is/was never assigned to.
(B) The optional-arg-is-present check is not just 'if (arg)' but 'if
(arg && arg->data)' as passing an unallocated
allocatable/disassociated pointer (i.e. 'arg->data = NULL') to a
nonpointer, nonallocatable optional dummy argument counts as absent
argument; this affects (A).
Solution: