From 372f4b6a4ecca33191159328989dbd16d5fcc527 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 15 Aug 2016 18:54:11 +0200 Subject: 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. --- tccgen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tccgen.c') diff --git a/tccgen.c b/tccgen.c index 27ea83f..cd6e690 100644 --- a/tccgen.c +++ b/tccgen.c @@ -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) { -- cgit v1.3.1