# Passing \`allocatable, optional\` to \`optional\` argument

**URL:** <https://fortran-lang.discourse.group/t/passing-allocatable-optional-to-optional-argument/9736>\
**Category:** Uncategorized\
**Created:** [May 16, 2025, 7:41am UTC](https://fortran-lang.discourse.group/t/passing-allocatable-optional-to-optional-argument/9736 "2025-05-16T07:41:43Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [May 16, 2025, 9:03am UTC](https://fortran-lang.discourse.group/t/passing-allocatable-optional-to-optional-argument/9736/3 "2025-05-16T09:03:09Z")

</div>

Reading [An unallocated variable passed as an argument is not PRESENT - #13 by billlong](https://fortran-lang.discourse.group/t/an-unallocated-variable-passed-as-an-argument-is-not-present/1724/13) 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)`

---

_[View the full topic](https://fortran-lang.discourse.group/t/passing-allocatable-optional-to-optional-argument/9736)._
