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>2022-01-28 12:59:09 +0100
commit546765d8d070e824fe61e6137b01e0693952885d (patch)
tree4749615d0fd11282fa250a2d004768279c0c416e
parentcdad82d01479408701d6f29c6a8e271cb5169b36 (diff)
downloadcython-546765d8d070e824fe61e6137b01e0693952885d.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)