spirv_new: ensure int64 printf test uses 64 bits (#2295)

The `extinst_printf_operands_scalar_int64` test could fail on 32-bit
platforms with `CL_INVALID_ARG_SIZE`, because the helper function was
not guaranteed to be instantiated using a 64-bit integer template type.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2025-03-05 01:53:25 +01:00
committed by GitHub
parent 7feb93cdd7
commit 733cc78c39

View File

@@ -30,6 +30,8 @@
#define streamDup2(fd1, fd2) dup2(fd1, fd2) #define streamDup2(fd1, fd2) dup2(fd1, fd2)
#endif #endif
#include <cstdint>
#include <fstream> #include <fstream>
#include <vector> #include <vector>
@@ -232,8 +234,9 @@ lX = 4
return TEST_SKIPPED_ITSELF; return TEST_SKIPPED_ITSELF;
} }
return printf_operands_helper(device, "printf_operands_scalar_int64", return printf_operands_helper<int64_t>(
"printf_operands_scalar_int64", expected, 4L); device, "printf_operands_scalar_int64", "printf_operands_scalar_int64",
expected, 4L);
} }
REGISTER_TEST(extinst_printf_operands_scalar_fp64) REGISTER_TEST(extinst_printf_operands_scalar_fp64)