[Python-checkins] bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983)

Steve Dower webhook-mailer at python.org
Wed Jun 12 14:09:07 EDT 2019


https://github.com/python/cpython/commit/ff6bb0aa95259413f359d42410526ff0b4dccfb7
commit: ff6bb0aa95259413f359d42410526ff0b4dccfb7
branch: master
author: Paul Monson <paulmon at users.noreply.github.com>
committer: Steve Dower <steve.dower at python.org>
date: 2019-06-12T11:08:40-07:00
summary:

bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983)

files:
M Objects/complexobject.c

diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index f78c0fdf78de..a49da4018411 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -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)



More information about the Python-checkins mailing list