From e05858a0f8dc3605429354590d091963a0f7fa16 Mon Sep 17 00:00:00 2001 From: Lenard Szolnoki Date: Sat, 4 Mar 2023 23:02:15 +0000 Subject: [PATCH] Work around clang bug. https://godbolt.org/z/zedh7rrhc This is similar to https://github.com/llvm/llvm-project/issues/47746, except I needed to use a different workaround. --- include/fast_float/bigint.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/fast_float/bigint.h b/include/fast_float/bigint.h index 5a72caa..3ad7315 100644 --- a/include/fast_float/bigint.h +++ b/include/fast_float/bigint.h @@ -594,7 +594,12 @@ struct bigint : pow5_tables<> { exp -= small_step; } if (exp != 0) { - FASTFLOAT_TRY(small_mul(vec, limb(small_power_of_5[exp]))); + // Work around clang bug https://godbolt.org/z/zedh7rrhc + // This is similar to https://github.com/llvm/llvm-project/issues/47746, + // except the workaround described there don't work here + FASTFLOAT_TRY( + small_mul(vec, limb(((void)small_power_of_5[0], small_power_of_5[exp]))) + ); } return true;