* stabsread.c (define-symbol): Use invisible references

for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
	* eval.c (evaluate_subexp_standard):  When known, use the formal
	parameter type as the expected type when evaluating arg expressions.
	* ch-lang.c (evaluate_subexp_chill):  Likewise (for MULTI_SUBSCRIPT).
This (with a fix to gcc/config/sparc/sparc.h) fixes PR chill/8742.
This commit is contained in:
Per Bothner 1996-01-12 01:31:37 +00:00
parent 71897943c4
commit 1c486a2ba5
4 changed files with 63 additions and 28 deletions

View file

@ -424,6 +424,17 @@ evaluate_subexp_chill (expect_type, exp, pos, noside)
argvec = (value_ptr *) alloca (sizeof (value_ptr) * (nargs + 2));
argvec[0] = arg1;
tem = 1;
if (type && TYPE_CODE (type) == TYPE_CODE_PTR)
type = check_typedef (TYPE_TARGET_TYPE (type));
if (type && TYPE_CODE (type) == TYPE_CODE_FUNC)
{
for (; tem <= nargs && tem <= TYPE_NFIELDS (type); tem++)
{
argvec[tem]
= evaluate_subexp_chill (TYPE_FIELD_TYPE (type, tem-1),
exp, pos, noside);
}
}
for (; tem <= nargs; tem++)
argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
argvec[tem] = 0; /* signal end of arglist */