.py
def dynfuncswitch(val, preferleft=True):
"""Causes gcc crash."""
return (math.floor if preferleft else math.ceil)(val)
.pxd
The above code is valid Python, and it Cythonizes fine, but it causes a crash in gcc. Typing the arguments and return of the function does not change the behaviour.
error: assignment of function ‘double __pyx_t_1(double)’
19498 | __pyx_t_1 = floor
.py.pxdThe above code is valid Python, and it Cythonizes fine, but it causes a crash in
gcc. Typing the arguments and return of the function does not change the behaviour.