Fix enum bitfields passed to stdarg functions

VT_ENUM types use the .ref member and can be VT_BITFIELD,
so we need to copy it as well.  Simply do it always.
This commit is contained in:
Michael Matz
2016-08-15 18:54:11 +02:00
parent d720865fb6
commit 372f4b6a4e
2 changed files with 6 additions and 0 deletions

View File

@ -4058,6 +4058,7 @@ static void gfunc_param_typed(Sym *func, Sym *arg)
gen_cast(&type);
} else if (vtop->type.t & VT_BITFIELD) {
type.t = vtop->type.t & (VT_BTYPE | VT_UNSIGNED);
type.ref = vtop->type.ref;
gen_cast(&type);
}
} else if (arg == NULL) {