# Arguments check : caller / callee

**URL:** <https://fortran-lang.discourse.group/t/arguments-check-caller-callee/6509>\
**Category:** Help\
**Created:** [September 14, 2023, 12:44pm UTC](https://fortran-lang.discourse.group/t/arguments-check-caller-callee/6509 "2023-09-14T12:44:26Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![PierU](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/pieru/32/1848_2.png) [@PierU](https://fortran-lang.discourse.group/u/PierU)\
**Post date:** [September 15, 2023, 8:29am UTC](https://fortran-lang.discourse.group/t/arguments-check-caller-callee/6509/13 "2023-09-15T08:29:20Z")

</div>

> [@RonShepard](#):
>
> ```auto
> real(wp), target :: work(n)
> integer, pointer :: iwp(:)
> 
> !call sub( n, work ) ! original call violates TKR.
> 
> call c_f_pointer( c_loc(work), iwp, [n] )
> call sub( n, iwp ) ! updated call with correct TKR.
> 
> ```

In [this discussion](https://fortran-lang.discourse.group/t/non-conformant-code-but-guaranteed-to-work/5511) we concluded that this approach was not standard conforming.

> [@rfournier](#):
>
> Unfortunately interfaces are really not possible due to our memory manager. All arrays are stored in a big chunk of memory which is of type integer ! =\> Type mismatch almost everywhere …

You cannot ask the compiler to check the number of arguments without checking the types, it’s all or nothing.

If your big chunk of memory is a static array, then you can use the `equivalence` feature:

```auto
integer :: iwork(N) ! N being known at compile time
real :: rwork(N)

equivalence(iwork,rwork)

```

Then `iwork` and `rwork` share the same memory location

---

_[View the full topic](https://fortran-lang.discourse.group/t/arguments-check-caller-callee/6509)._
