aboutsummaryrefslogtreecommitdiffstats
path: root/community/ldc/disable-static-assert.patch
blob: 96a543164942c177cb5c63c5f83d447b64b8bae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)
     {