Passing `allocatable, optional` to `optional` argument

some aspects of this are discussed in An unallocated variable passed as an argument is not PRESENT.

According to my understanding, the code is valid and in the first case the argument in opt is not present.

1 Like