Skip to content

Commit ff6bb0a

Browse files
paulmonzooba
authored andcommitted
bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983)
1 parent daf6262 commit ff6bb0a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Objects/complexobject.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ _Py_c_prod(Py_complex a, Py_complex b)
5555
return r;
5656
}
5757

58+
/* Avoid bad optimization on Windows ARM64 until the compiler is fixed */
59+
#ifdef _M_ARM64
60+
#pragma optimize("", off)
61+
#endif
5862
Py_complex
5963
_Py_c_quot(Py_complex a, Py_complex b)
6064
{
@@ -112,6 +116,9 @@ _Py_c_quot(Py_complex a, Py_complex b)
112116
}
113117
return r;
114118
}
119+
#ifdef _M_ARM64
120+
#pragma optimize("", on)
121+
#endif
115122

116123
Py_complex
117124
_Py_c_pow(Py_complex a, Py_complex b)

0 commit comments

Comments
 (0)