I am trying to use fftpack with gfortran, but I am getting errors that i think relate to that some routines are passed complex arrays when the dummy argument is declared as real
I encountered this problem when I refactored FFTPACK 5.1 from FORTRAN 77 to Fortran 2008. I performed a C-language style cast without copying as follows:
use ISO_C_binding, only: c_f_pointer, c_loc
integer, parameter :: N = 42
complex, target :: c(N) ! Also works for the allocatable attribute
real, pointer :: r(:) => null()
! Pass memory address from complex array to real array
call c_f_pointer(c_loc(c), r, shape=[2*size(c)])
call procedure_expecting_real_arg(r, ....)
! Terminate association
nullify( r )