Reading An unallocated variable passed as an argument is not PRESENT - #13 by billlong I also interpret that the posted code should be conforming, because i
from opt_alloc
is the actual argument fed to opt
and it is not only not allocated; also not present.
But of course assuming standard conformity, a compiler would have to handle the subtle address difference between present(i) .and. .not.allocated(i)
and .not.present(i)