Nvfortran 23.3 problems in passing complex parameters to kernels through modules

Hello :)
as in the title, I find problems in passing complex parameters to kernels through modules, with nvfortran 23.3 compiler.
Everything is O.K. with real parameters.
The simplest code showing the problem I could write is as follows:


!*******************************************************************************
!*******************************************************************************
MODULE PASSPAR
Implicit None

 Complex(8), Dimension(2), Parameter :: cmplx_par=[(1._8,2._8),(3._8,4._8)]
 Real(8), Dimension(2), Parameter :: real_par=[5._8,6._8]

END MODULE PASSPAR


!*******************************************************************************
!*******************************************************************************
PROGRAM MAIN
USE CUDAFOR
Implicit None
Integer :: istat

INTERFACE
  Attributes(Global) Subroutine kernel_gpu_writepar()
  USE PASSPAR
  Implicit None
  End Subroutine kernel_gpu_writepar
END INTERFACE


Call kernel_gpu_writepar<<<dim3(1,1,1),dim3(1,1,1)>>>()
istat=CudaDeviceSynchronize()

END PROGRAM MAIN

!*******************************************************************************
!*******************************************************************************
Attributes(Global) Subroutine kernel_gpu_writepar()
USE PASSPAR
Implicit None

write(*,*)
write(*,*) cmplx_par(1)
write(*,*) cmplx_par(2)
write(*,*)
write(*,*) real_par(1)
write(*,*) real_par(2)
write(*,*)

End Subroutine kernel_gpu_writepar

Any help is wellcome, thankyou :)

This just looks like a bug. I will file an issue with the compiler group. complex(4) works, as do complex(8) parameters when they are not a part of an array.

Hello, bleback, thankyou very much for your reply :) So, I will adopt the workaround you indicated where possible, while waiting for the bug to be fixed in future releases of nvfortran

This is fixed in our 23.7 release which is now available for download.

Thankyou :)