summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-12-20 11:44:13 +0100
committerStefan Behnel <stefan_ml@behnel.de>2021-12-20 11:44:13 +0100
commit7fca8c861c9bc509869a4887179a0750eac290d3 (patch)
treefd9a396191e7106ce4d5fd394afb10348036131e
parentdcf1062d981465337ca64bfe391e61125ed90792 (diff)
downloadcython-7fca8c861c9bc509869a4887179a0750eac290d3.tar.gz
Fix division-by-zero crash in tests when the C ompiler discards the computational body of a Cython coroutine.
-rw-r--r--tests/run/line_profile_test.srctree1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/run/line_profile_test.srctree b/tests/run/line_profile_test.srctree
index 80e4f2ae3..ea02261a4 100644
--- a/tests/run/line_profile_test.srctree
+++ b/tests/run/line_profile_test.srctree
@@ -126,6 +126,7 @@ async def cy_coro(int n):
n //= 2
else:
n = 3*n+1
+ x = <object> n # make sure the computation does not get discarded
@cython.binding(True)