Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r48918:0f2d4f02b0e3
Date: 2011-11-08 12:28 +0100
http://bitbucket.org/pypy/pypy/changeset/0f2d4f02b0e3/

Log:    Add a passing test that rgc.ll_arraycopy cannot raise.

diff --git a/pypy/translator/backendopt/test/test_canraise.py 
b/pypy/translator/backendopt/test/test_canraise.py
--- a/pypy/translator/backendopt/test/test_canraise.py
+++ b/pypy/translator/backendopt/test/test_canraise.py
@@ -201,6 +201,16 @@
         result = ra.can_raise(ggraph.startblock.operations[0])
         assert result
 
+    def test_ll_arraycopy(self):
+        from pypy.rpython.lltypesystem import rffi
+        from pypy.rlib.rgc import ll_arraycopy
+        def f(a, b, c, d, e):
+            ll_arraycopy(a, b, c, d, e)
+        t, ra = self.translate(f, [rffi.CCHARP, rffi.CCHARP, int, int, int])
+        fgraph = graphof(t, f)
+        result = ra.can_raise(fgraph.startblock.operations[0])
+        assert not result
+
 
 class TestOOType(OORtypeMixin, BaseTestCanRaise):
     def test_can_raise_recursive(self):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to