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