[Prev][Next][Index]

Re: Fortran parser bug



> 
> When traversing the symbol table for this program, two distinct symbols are
> introduced for the function foo: one at the point of call, one at the
> function header. Both symbols have type FUNCTION_NAME. 
> 
> Even if there are more calls to foo, only those two symbols are created.
> 

Here comes the fix:

In the grammar file f2dep/cftn.gram, find the grammar rule "funcname",
and change one of its action statement

              $$ = make_function($1, TYNULL, LOCAL);
to
              $$ = make_function($1, TYNULL, YES);

Also, do the same thing to the grammar rule "typedfunc". 


This should eliminate the redundant function name symbol node. Please
let me know if there is any problem. Thanks!


Chih-Yi




Reference(s):