Error msg : PGF90-S-0310

Hi,

When I try to use pgf95 compiler on some fortran code I received from other people. I got this error:

PGF90-S-0310-Adjustable array can not have automatic bounds specifiers - dz (Chck_HD_Stblty.f: 13)
PGF90-S-0310-Adjustable array can not have automatic bounds specifiers - dzz (Chck_HD_Stblty.f: 13)

Line 13 of the aforementioned script is:
“integer DZ(KB+1),DZZ(KB+1)”

The shell script to call the compiler is:
“pgf95 -byteswapio -Mextend chck_HD_stblty.f”

Any help is much appreciated!

Thanks,
Chiyu

Hi Chiyu,

Do you have a more complete example of the code, in particular showing how “KB” is declared?

My guess is the KB is declared locally in the subroutine and not passed in. Hence KB can’t be used to size the adjustable arrays.

Something like:

% cat test.f

        subroutine bar()
          integer :: KB=100
          integer DZ(KB+1)
        end subroutine bar
% pgfortran -c test.f
PGF90-S-0310-Adjustable array can not have automatic bounds specifiers - dz (test.f: 4)
  0 inform,   0 warnings,   1 severes, 0 fatal for bar
% gfortran -c test.f
test.f:4:21:

           integer DZ(KB+1)
                     1
Error: Variable 'kb' cannot appear in the expression at (1)

-Mat

Thanks Mat!

I tried to search for this “KB” but couldn’t find it declared anywhere. And then I just realized that it might be a typo. There is a “KBM1” declared earlier in the script and this “KB+1” should have been “KBM1”…

Problem solved! Thanks again.

Chiyu

Hi Chiyu,

What compiler version and platform are you using?

We did have an issue with two of the RC files (our compiler config files) when running pgf77 on Windows with 19.4, which gave this error. The error was fix in 19.5.

If this is the case for you, the work around would be to use pgfortran instead of pgf77.

-Mat

Hi Mat -

Thanks again. (sorry I moved my original question to another thread.)

Yes we are running the 19.04 version with Linux x86-64 platform.

Would 19.05 version be released soon?

I will try to use pgfortran to replace pgf77.

Thank you so much!

Chiyu

19.5 was released in May but is only available to Professional Edition license holders. If you do have a Professional Edition, you can download the most current release (19.7) from the downloads link at the top of this page or 19.5 from the archive versions.

The next Community Edition will be 19.10.

-Mat

Thank you Mat. Got it.