Bug Report for PGF95 in ver. 12.4

I’d like to report a bug I found in pgf95 12.4:

Some codes that were able to be compiled under pgf95 10.9 failed when compiling with pgf95 12.4. I’ve attached the code sample in a tarball. The short description about what I think the issue is that compiler failed to compile a module that tries to refer to KIND parameter defined in another module (via use), if the former contains interfaces with many functions. Note that the compile might still work if the number of subroutines in the interface are reduced… With previous version (10.9) I don’t have any issues compiling the same code.

To repeat the error, just try to compile codes found in the tarball:

First, trying to compile typeSizes.f90 as object and link it with arrays.f90, using the old version (10.9) of pgf95:

pgf95 -c -o typeSizes.o typeSizes.f90
pgf95 typeSizes.o -c -o array.o arrays.f90

PGI 10.9 has no problem compiling these codes. However, when using version 12.4, I got error messages:

pgf95 -c -o typeSizes.o typeSizes.f90 (this step is still ok)
pgf95 typeSizes.o -c -o array.o arrays.f90

Error messages:
arrays.f90:
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2043)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2043)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2046)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2046)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2051)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2051)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2054)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2054)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2091)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2091)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2094)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2094)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2099)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2099)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2102)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2102)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2139)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2139)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2142)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2142)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2147)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2147)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2150)
PGF90-S-0081-Illegal selector - KIND parameter has unknown value for data type (arrays.f90: 2150)
PGF90-S-0087-Non-constant expression where constant expression required (arrays.f90: 2187)
PGF90-F-0008-Error limit exceeded (arrays.f90: 2187)
PGF90/x86-64 Linux 12.4-0: compilation aborted

As you can see, the whole content in arrays.f90 is basically doing the same thing, yet the compiler only start complaining later ( after line 2000+ ).
Even if I rearrange the order of the function calls. The compilation still fails at the same line (but actually with different code).

attached:
testcase_to_pgroup.tar.bz2

Thanks,
Jason

Thanks for the report Jason. I will take a look at this and let you know what we find out.

I have been able to recreate the issue and have filed a bug. The bug number is: fs18788

TPR 18788 - Use-associated parameter not visible: -Non-constant expression where constant expression require

was fixed in the 12.8 release.

I haven’t logged in to this forum for some while. Thanks for the fix!