CUDA fortran : debug and rdc option don't work together

I have a very simple CUDA fortran code.

! simple.f90
module simple
    implicit none
    real, allocatable, device :: a_dev(:)
end module

When I compile it with both debug and rdc option on, an error occurs.

[heehoon]$ pgf90 -Mcuda=cc60,debug,rdc -c simple.f90
ptxas fatal   : Internal error: section not found
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (simple.f90: 1)
PGF90/x86-64 Linux 17.4-0: compilation aborted

If one of options is off, it is compiled without error.
Is it expected behaviour?

Hi HeeHoon Kim,

Is it expected behaviour?

No, it’s a problem with the CUDA 8.0 ptxas. Do you have PGI 17.10? If so, try compiling with CUDA 9.0.

% pgf90 -c -Mcuda=cc60,cuda8.0 -g test.f90
ptxas fatal   : Internal error: section not found
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (test.f90: 1)
PGF90/x86-64 Linux 17.10-0: compilation aborted
% pgf90 -c -Mcuda=cc60,cuda9.0 -g test.f90

Note that “rdc” is enabled by default so isn’t necessary to add.

-Mat

Oh I see. Thank you, Mat :)