diff --git a/test_conformance/spirv_new/test_decorate.cpp b/test_conformance/spirv_new/test_decorate.cpp index 9718b76cd4..efcd30525b 100644 --- a/test_conformance/spirv_new/test_decorate.cpp +++ b/test_conformance/spirv_new/test_decorate.cpp @@ -482,15 +482,18 @@ template static inline To round_to_neginf(Ti in) template static inline Ti generate_fprounding_input(RandomSeed &seed) { - constexpr auto minVal = std::numeric_limits::min() / 2; - constexpr auto maxVal = std::numeric_limits::max() / 2; - if (std::is_same::value) { + constexpr auto minVal = + static_cast(std::numeric_limits::min() / 2); + constexpr auto maxVal = + static_cast(std::numeric_limits::max() / 2); cl_float f = genrandReal_range(minVal, maxVal, seed); return cl_half_from_float(f, CL_HALF_RTE); } + constexpr auto minVal = static_cast(std::numeric_limits::min() / 2); + constexpr auto maxVal = static_cast(std::numeric_limits::max() / 2); return genrandReal_range(minVal, maxVal, seed); }