Reset the temp variables list back to empty at the start of emitting the
array dup function and restore it at the end.
var old_symbol = current_symbol;
var old_temp_vars = temp_vars;
current_symbol = null;
+ temp_vars = new ArrayList<LocalVariable> ();
var cdecl = new CCodeDeclaration (array_type.get_cname ());
var cvardecl = new CCodeVariableDeclarator ("result");
var old_symbol = current_symbol;
var old_temp_vars = temp_vars;
current_symbol = null;
+ temp_vars = new ArrayList<LocalVariable> ();
var idx_decl = new CCodeDeclaration ("int");
idx_decl.add_declarator (new CCodeVariableDeclarator ("i"));