From 733cc78c3986f18cab5c704bc98c958c261cbb82 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Wed, 5 Mar 2025 01:53:25 +0100 Subject: [PATCH] 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 --- test_conformance/spirv_new/test_extinst_printf.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test_conformance/spirv_new/test_extinst_printf.cpp b/test_conformance/spirv_new/test_extinst_printf.cpp index 54bb8326..d55935e2 100644 --- a/test_conformance/spirv_new/test_extinst_printf.cpp +++ b/test_conformance/spirv_new/test_extinst_printf.cpp @@ -30,6 +30,8 @@ #define streamDup2(fd1, fd2) dup2(fd1, fd2) #endif +#include + #include #include @@ -232,8 +234,9 @@ lX = 4 return TEST_SKIPPED_ITSELF; } - return printf_operands_helper(device, "printf_operands_scalar_int64", - "printf_operands_scalar_int64", expected, 4L); + return printf_operands_helper( + device, "printf_operands_scalar_int64", "printf_operands_scalar_int64", + expected, 4L); } REGISTER_TEST(extinst_printf_operands_scalar_fp64)