I am trying to get legacy FORTRAN code by creating it from source using gfortran. I finally was able to build it successfully, but now I get an error beyond when it starts. I used gdb and traced the error to a function that uses the loc () intrinsic property. When I try to print the loc(ae)
value, when ae is passed my integer value, I get the error message "No symbol" loc "in current context". I tried compiling with ifort 11.x and debugging with DDT and got the same error. For me, this means that the compiler knows nothing about the internal.
A little reading showed that loc intrinsic was not part of the F77 standard, so maybe this is part of the problem. I have placed the definition of an internal property below, but I do not know how to implement this in my code, so loc () can be used.
Any advice or am I misinterpreting my problem? Since both gfortran and ifort fail in the same place due to an error outside the bounds, but a function using loc () returns the same large number between both compilers. It seems a little strange that loc () will not work if both compilers shoot the same value for loc.
Using:
iaddr = loc (obj)
Where:
An OBJ is a variable, array, function, or subroutine whose address is required. iaddr is an integer with the address "obj". The address is in the same format stored in the LARn instruction.
Description:
LOC is used to get the address of something. The return value is not really useful in Fortran, but may be needed for GMAP routines or very special debugging.
Bob source share