diff --git a/include/xsimd/arch/generic/xsimd_generic_math.hpp b/include/xsimd/arch/generic/xsimd_generic_math.hpp index 87e9626c5..0e477f2a4 100644 --- a/include/xsimd/arch/generic/xsimd_generic_math.hpp +++ b/include/xsimd/arch/generic/xsimd_generic_math.hpp @@ -1733,8 +1733,8 @@ namespace xsimd { // to v. That's not what we want, so prevent compiler optimization here. // FIXME: it may be better to emit a memory barrier here (?). #ifdef __FAST_MATH__ - volatile batch_type d0 = v + t2n; - batch_type d = *(batch_type*)(void*)(&d0) - t2n; + volatile auto d0 = (v + t2n).data; + batch_type d = batch_type(d0) - t2n; #else batch_type d0 = v + t2n; batch_type d = d0 - t2n;