Normally %LOC
is allowed only in parameter lists. However the intrinsic
function LOC
does the same thing, and is usable as the right-hand-side of
assignments. For compatibility, GNU Fortran supports the use of %LOC
as
an alias for the builtin LOC
with -std=legacy. With this
feature enabled the following two examples are equivalent:
integer :: i, l l = %loc(i) call sub(l)
integer :: i call sub(%loc(i))