f18-llvm-project
f18-llvm-project copied to clipboard
Enable calling procedures declared in an outer scope
We do not currently handle the case where an internal procedure calls a procedure whose name is declared in an outer scope. Here's an example program:
PROGRAM call_outer
INTRINSIC amod
CALL outer(amod)
END
SUBROUTINE outer(mod)
REAL,EXTERNAL :: mod
real :: result
result = inner()
CONTAINS
FUNCTION inner()
REAL inner
inner = mod(3.0, 4.0) ! mod is declared in "outer"
END FUNCTION
END subroutine