I’m attempting to use -Mipa=inline to inline functions from one fortran module into the main program so that I can use that function within an accelerator region. I’m getting the following error though from the IPA:

```
81, subprogram not inlined -- type mismatch: laplace_sphere_wk, argument 3
```

```
function laplace_sphere_wk(s,deriv,elem) result(laplace)
real(kind=real_kind), intent(in) :: s(nv,nv)
type (derivative_t) :: deriv
type (element_t) :: elem
real(kind=real_kind) :: laplace(nv,nv)
...
end function laplace_sphere_wk
program driver
type (element_t),allocatable,dimension(:) :: elem(:)
...
do ie=nets, nete
do q=1,qsize
do k=1,nlev
laplace5d(:,:,k,q,ie) = laplace_sphere_wk( s5d(:,:,k,q,ie) , deriv, elem(ie) )
enddo
enddo
enddo
end program
```

The subroutine expects 1 element_t, the caller passes in 1 element_t from an array. There’s some subtlety here that I’m missing. Does anyone have an idea of how I can make this inline?

Thanks!