Someone suggested a compiler with XREF. I believe that FLINT may do this:
"...symbol cross-reference information to show all code references to any
symbol in the analyzed program,..."
On 9 Oct 2005 09:49:10 -0700, email@example.com
-|Sometimes I inadvertently set the value of a variable but do not use it
-|before it is reset to another value, so that the initial statement
-|setting the variable is redundant. A trivial example is below.
-|integer :: i
-|i = 1 ! line has no effect
-|i = 2
-|Are there any compilers that warn about such a redundant line? Do you
-|think it would be useful to get such warnings? In a realistic example,
-|there may be many lines of code separating the statements setting 'i',
-|so the redundant code may be hard for the programmer to spot.
-|One difficulty is that it may be impossible to say if a statement
-|setting a variable to an expression involving a non-PURE function is