anchor.diff:  !  FFFTW_fwd_*() computes the FT for a 1d array.  This is done out-of-place, so
   !  the input array is preserved.  complex_fft
      implicit none
  -   real(r4), intent(in), dimension(:) :: real_array
  +   real(r4), intent(inout), dimension(:) :: real_array
      complex(c4), intent(inout), allocatable, dimension(:) :: complex_fft
      integer(C_INT), intent(in), optional :: plan_type
      integer(C_INT) :: fftw_plan_type
  
positive.code:    fftw_plan_type = FFTW_ESTIMATE
     if (present(plan_type)) fftw_plan_type = int(plan_type, kind=C_INT)
  
     call dfftw_plan_dft_c2r_1d(plan, &
                                int(nr, kind=C_INT), &
                                complex_fft, &
                                real_array, &
                                fftw_plan_type)
     call dfftw_execute_dft_c2r(plan, complex_fft, real_array)
     call dfftw_destroy_plan(plan)
  
     ! Normalise values
     real_array = real_array/real(nr, kind=r4)
  
negative.code:    fftw_plan_type = FFTW_ESTIMATE
     if (present(plan_type)) fftw_plan_type = int(plan_type, kind=C_INT)
  
     plan = fftwf_plan_dft_1d(int(nr, kind=C_INT), &
                            complex_array, &
                            complex_fft, &
                            FFTW_FORWARD, &
                            fftw_plan_type)
     call fftwf_execute_dft(plan, complex_array, complex_fft)
     call fftwf_destroy_plan(plan)
  
  end subroutine FFFTW_fwd_c2c_1d_complex4
  !-------------------------------------------------------------------------------
  