From 8c298b1c3be240a0bf1ea8297b09df27a5b30681 Mon Sep 17 00:00:00 2001 From: Sreelakshmi Haridas Maruthur Date: Tue, 18 Feb 2025 21:48:26 -0700 Subject: [PATCH] printf: Fix printf 'mixed_format_random' (#2236) %a or %A with printf on MSVC platforms have a default precision of 13, which is in contrast to OpenCL C specification for printf which only allows for exact digits required if precision is not specified. --- test_conformance/printf/test_printf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_conformance/printf/test_printf.cpp b/test_conformance/printf/test_printf.cpp index 380878cb..e2991f39 100644 --- a/test_conformance/printf/test_printf.cpp +++ b/test_conformance/printf/test_printf.cpp @@ -247,7 +247,7 @@ cl_program makeMixedFormatPrintfProgram(cl_kernel* kernel_ptr, }; std::array, 2> formats = { - { { "%f", "%e", "%g", "%a", "%F", "%E", "%G", "%A" }, + { { "%f", "%e", "%g", "%13a", "%F", "%E", "%G", "%13A" }, { "%d", "%i", "%u", "%x", "%o", "%X" } } }; std::vector data_before(2 + genrand_int32(gMTdata) % 8);