aports/community/ldc/disable-static-assert.patch

27 lines
852 B
Diff

https://github.com/ldc-developers/ldc/issues/3270
See https://git.musl-libc.org/cgit/musl/tree/src/math/sqrtl.c
diff --git a/runtime/phobos/std/math.d b/runtime/phobos/std/math.d
index 1c526d8..67f2521 100644
--- a/runtime/phobos/std/math.d
+++ b/runtime/phobos/std/math.d
@@ -4925,7 +4925,17 @@
enum real SQRTMIN = 0.5 * sqrt(real.min_normal); // This is a power of 2.
enum real SQRTMAX = 1.0L / SQRTMIN; // 2^^((max_exp)/2) = nextUp(sqrt(real.max))
- static assert(2*(SQRTMAX/2)*(SQRTMAX/2) <= real.max);
+ // https://github.com/ldc-developers/ldc/issues/3270#issuecomment-613132406
+ version(AArch64)
+ {
+ }
+ else version(SystemZ)
+ {
+ }
+ else
+ {
+ static assert(2*(SQRTMAX/2)*(SQRTMAX/2) <= real.max);
+ }
static if (floatTraits!(real).realFormat == RealFormat.ieeeQuadruple)
{