]> granicus.if.org Git - python/commitdiff
bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 12 Jun 2019 18:27:15 +0000 (11:27 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Jun 2019 18:27:15 +0000 (11:27 -0700)
(cherry picked from commit ff6bb0aa95259413f359d42410526ff0b4dccfb7)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
Objects/complexobject.c

index f78c0fdf78def42a5f3cc8f8e25977b05c150a7b..a49da4018411e70b1b8ac4d13c7bcfa78675b9f8 100644 (file)
@@ -55,6 +55,10 @@ _Py_c_prod(Py_complex a, Py_complex b)
     return r;
 }
 
+/* Avoid bad optimization on Windows ARM64 until the compiler is fixed */
+#ifdef _M_ARM64
+#pragma optimize("", off)
+#endif
 Py_complex
 _Py_c_quot(Py_complex a, Py_complex b)
 {
@@ -112,6 +116,9 @@ _Py_c_quot(Py_complex a, Py_complex b)
     }
     return r;
 }
+#ifdef _M_ARM64
+#pragma optimize("", on)
+#endif
 
 Py_complex
 _Py_c_pow(Py_complex a, Py_complex b)