From: Terence on
Some F77 compilers optionally produced a list for each module
(program, function or subroutine) of what external modules were called
or invoked from within each module, in turn. These were also labelled
as being present in the overall compilation by module name, or not
found and so completely external.

I have written my own such source processor not roo long ago and still
use it occasionally.

My MS V3.31 compiler has a switch for doing this on an optional extra
pass, as well as machine code.

But when at IBM in 1961-64, I remember having written a flow diagram
genarator for Fortran source, (FI,II,"3",IV) with rectangles for
process blocks and diamonds for three-way branching decisions all
connected by mainly vertical parallel lines down the right side, or to
arrows with "other page" labels. Maybe someone has it. So it should
not be so hard to do today. Obviously, as pointed out earlier, any
recursive procedure would loop back to its own entry point, but it
would have at least one exit condition route. But I don't see that it
causes any impossibilities.

(I also wrote the program to play tunes on the 1403 print chain,
with a 4-character note code for letter, octave, flat/normal/sharp and
duration, between more useful products).