Call find_type for pascal functions/procedures.

The result of parse_params needs to be passed through find_type before
actually being used. I guess I'd missed this back when I got things working
for qc.
This commit is contained in:
Bill Currie 2012-08-07 08:10:29 +09:00
parent 144387c3e3
commit 5530e84ada

View file

@ -161,6 +161,7 @@ program
$1 = new_symbol (".main");
$1->params = 0;
$1->type = parse_params (&type_void, 0);
$1->type = find_type ($1->type);
$1 = function_symbol ($1, 0, 1);
current_func = begin_function ($1, 0, current_symtab, 0);
current_symtab = current_func->symtab;
@ -176,6 +177,7 @@ program_head
$$ = $3;
$$->type = parse_params (&type_void, 0);
$$->type = find_type ($$->type);
$$ = function_symbol ($$, 0, 1);
}
;
@ -258,6 +260,7 @@ subprogram_head
} else {
$$->params = $3;
$$->type = parse_params ($5, $3);
$$->type = find_type ($$->type);
$$ = function_symbol ($$, 0, 1);
}
}
@ -269,6 +272,7 @@ subprogram_head
} else {
$$->params = $3;
$$->type = parse_params (&type_void, $3);
$$->type = find_type ($$->type);
$$ = function_symbol ($$, 0, 1);
}
}