Fortran submodule array bound error


I’ve been trying out pgi’s support of Fortran submodules and there appears to be a bug when you use an interface to a module function that has an * in an array size. For example:

   module function thing(n,x) result(y)
      integer, intent(in) :: n
      real, intent(in) :: x(n*n)
      real :: y(n*n)
   end function thing
end interface

I have tried this with both 19.4 and 19.10 compiler versions and for comparison gfortranand ifort work fine. Any ideas? Here’s a link to some code that reproduces the problem


Hi Will,

Thanks for the report. I was able to reproduce the issue here and have added a new problem report (TPR #28072). We’ll have a compiler engineer take a look and determine the issue.

Best Regards,

The original issue, TPR 28072, is fixed in all NVIDIA HPC SDK compiler releases.