SUIF2: probable bug in TypeBuilder::get_c_procedure_type()

Karl Eisenhofer karl@stage2i.com
Mon, 01 May 2000 19:12:02 -0700


TypeBuilder::get_c_procedure_type() is not
correctly selecting the  SymbolTable in which to put the new
CProcedureType.
The function TypeBuilder::most_nested_common_scope() does
not return the correct SymbolTable in all cases.  This results in
in down-scope references in the type, which can be a real problem when
deleting symbol tables.

There is an additional problem with TypeBuilder::get_array_type().
Since the bounds
of the array are expressions, there can be constant symbols representing
the bounds.
Since the array type is unconditionally put in the scope of the element
type, the bounds
symbols could be down-scope references or they could be in unrelated
scopes, again
resulting in problematic behavior when selectively deleting symbol
tables.  There
needs to be a step similar to the most_nested_common_scope call for
get_c_procedure_type()
which finds the common scope of all the symbols in the bounnds
expression and the element type.

Thanks,

Karl Eisenhofer