I have an old fortran 77 code that was written to compile with pgif77. On our test machines we have pgi version 4.0, and it compiles the code fine, but on our cluster we have pgi version 6.2 and I am running into a problem. When a cray pointer variable is declared (as an integer) in a common block and then other variables in that common block are initialized in a data block, using that pointer in a POINTER (x,y) declaration produces an error.
The following example produces the error (on 6.2 but not 4.0):
! test.f block data test integer a,b common /area/ a,b data a/5/ end program main common /area/ a,b integer x,a,b pointer (b, x) print a,b,x end
and the error produced is (pgf77 -c test.f):
PGFTN-S-0168-Incompatible size of common block area (test.f)
Is this a bug? I don’t see what could be changing the size of the common block. Even stranger is that the code will compile if the “data a/5/” statement is commented out. It will also compile if the “pointer (b, x)” is commented out, but that is needed.