# Does this program conform to the standard?

**URL:** <https://fortran-lang.discourse.group/t/does-this-program-conform-to-the-standard/5396>\
**Category:** Help\
**Created:** [March 16, 2023, 7:10pm UTC](https://fortran-lang.discourse.group/t/does-this-program-conform-to-the-standard/5396 "2023-03-16T19:10:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aradi](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/aradi/32/3659_2.png) [@aradi](https://fortran-lang.discourse.group/u/aradi)\
**Post date:** [March 16, 2023, 7:37pm UTC](https://fortran-lang.discourse.group/t/does-this-program-conform-to-the-standard/5396/2 "2023-03-16T19:37:43Z")

</div>

No, it is not standard conforming.

1. You have a temporary expression, which does not exist after the call.
2. Pointers to a `target` dummy arguments are invalid after the end of the routine, if the actual argument did not have the `target` attribute. (See among others the discussion [Is pointing to a target dummy argument safe after return?](https://fortran-lang.discourse.group/t/is-pointing-to-a-target-dummy-argument-safe-after-return/5199))

Actually, turning your dummy argument `integer, target :: a` into `integer, pointer, intent(in) :: a` would have triggered a meaningful error message… But again, as you can see on the long discussion referenced above (read maybe the short summary in [Is pointing to a target dummy argument safe after return? - #28 by aradi](https://fortran-lang.discourse.group/t/is-pointing-to-a-target-dummy-argument-safe-after-return/5199/28)), it is a personal preference, whether one likes the automatic conversion of target actual arguments into pointer dummies or not.

---

_[View the full topic](https://fortran-lang.discourse.group/t/does-this-program-conform-to-the-standard/5396)._
