title: How to debug Fortran 90 compile error "There is no specific subroutine for the generic 'foo' at (1)"?
body: <p>I am trying to write Fortran 2003 bindings to CUFFT library using iso_c_bindings module, but I have problems with <code>cufftPlanMany</code> subroutine (similar to <code>sfftw_plan_many_dft</code> in FFTW library).</p>
  
  <p>The bindings itself look like this:</p>
  
  <pre><code>
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  !
  ! cufftResult cufftPlanMany(cufftHandle *plan, int rank, int *n,
  !                           int *inembed, int istride, int idist,
  !                           int *onembed, int ostride, int odist,
  !                           cufftType type, int batch)
  !
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  
  interface cufftPlanMany
  subroutine cufftPlanMany(plan, rank, n, &
                           inembed, istride, idist, &
                           onembed, ostride, odist, &
                           type, batch) &
  & bind(C,name='cufftPlanMany')
  use iso_c_binding
  integer(c_int):: plan
  integer(c_int),value:: rank, type, batch
  integer(c_int):: n(*)
  integer(c_int),value:: istride, idist, ostride, odist
  integer(c_int):: inembed(*), onembed(*)
  end subroutine cufftPlanMany
  end interface cufftPlanMany
  </code></pre>
  
  <p>The calling part looks like this:</p>
  
  <pre><code>
    integer(c_int):: plan
    integer(c_int):: batch
    integer(c_size_t):: size
  
  ! ...
  
      call cufftPlanMany(plan, 1, size,&
                         0, 1, size,&
                         0, 1, size,&
                         CUFFT_C2C, batch)
  </code></pre>
  
  <p>Unfortunately trying to compile this results in</p>
  
  <blockquote>
    <p>Error: There is no specific subroutine for the generic 'cufftplanmany' at (1)</p>
  </blockquote>
  
  <p>compilation error.  Trying to use variables in place of constants didn't help either.  Could you help with debugging this?</p>
  
  <p>The compiler used is <em>gfortran</em>: GNU Fortran (Gentoo 4.4.5 p1.2, pie-0.4.5) 4.4.5</p>