tests/checkasm/sw_ops: Avoid 1 << 32

It is UB.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-09-13 21:27:27 +02:00
parent 1294ab5db1
commit bc545bae3b

View File

@@ -426,7 +426,7 @@ static void check_pack_unpack(void)
.pack = pack,
});
CHECK_RANGE(FMT("unpack_%s", pat), (1 << total) - 1, 1, num, type, type, {
CHECK_RANGE(FMT("unpack_%s", pat), UINT32_MAX >> (32 - total), 1, num, type, type, {
.op = SWS_OP_UNPACK,
.type = type,
.pack = pack,