Fortran submodule array bound error

Hi,

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:

interface 
   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 https://github.com/WillTrojak/compiler_bugs/tree/master/pgi_f90_smod-array-dims

Will

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,
Mat

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