diff --git a/src/eval/eval_bundles.c b/src/eval/eval_bundles.c index 98f5c5f7..d4ade515 100644 --- a/src/eval/eval_bundles.c +++ b/src/eval/eval_bundles.c @@ -170,7 +170,7 @@ e_value_eval_from_eval(E_Eval eval) U64 valid_bits_mask = 0; for(U64 idx = 0; idx < type->count; idx += 1) { - valid_bits_mask |= (1<> type->off; eval.value.u64 = eval.value.u64 & valid_bits_mask; diff --git a/src/mule/mule_c.c b/src/mule/mule_c.c index 2836ec39..92492aba 100644 --- a/src/mule/mule_c.c +++ b/src/mule/mule_c.c @@ -91,6 +91,13 @@ struct TypeWithBitfield int z : 10; }; +typedef struct BitfieldType64 BitfieldType64; +struct BitfieldType64 +{ + uint64_t size : 63; + uint64_t is_free : 1; +}; + void c_type_with_bitfield_usage(void) { @@ -103,4 +110,8 @@ c_type_with_bitfield_usage(void) int x = (b.v + b.x); int y = (b.y - b.z); int z = (b.w) + 5; + BitfieldType64 b64 = {0}; + b64.size = 524288; + b64.is_free = 1; + int abc = 0; }