'loc()' in gfortran

Stephan Siemen Stephan.Siemen@ecmwf.int
Fri Jul 1 15:01:00 GMT 2005


Hi,

We try to compile our software on gfortran 4.0 (fedora core 4) and getting an error message like

cc5sc8W6.f: undefined reference to `loc_'

while linking. This loc (intrinsic?) function is not part of the Fortran standard, but is available on all Fortran compilers we 
tried, beside of gfortran (xlf90, g77, sun f90). Unfortunately this function is important to our code. Below I have a 
description of what the function should do. As far as I can see (no fortran expert), this function needs implementing on 
compiler level ...

Will loc be part of a future release of gfortran?

Thanks a lot!!!
Stephan



LOC - find the address of a Fortran object
==========================================

Usage:

iaddr = loc(obj)

Where:

obj
     is a variable, array, function or subroutine whose address is wanted.
iaddr
     is an integer with the address of "obj". The address is in the same format as stored by an LARn instruction.

Description:

LOC is used to obtain the address of something. The value returned is not really useful within Fortran, but may be needed for 
GMAP subroutines, or very special debugging.



More information about the Fortran mailing list